Unstable collision detection in physics on x86-64 branch
Grocel opened this issue · 0 comments
On the x86-64
branch the physics has quite an unreliable collision detection. This means in some cases props and other physics objects will briefly glitch through map object, other props or other physics objects.
Where does the issue exist:
Branch/Mode | Yes | No |
---|---|---|
x86-64 , 32bit |
x | |
x86-64 , 64bit |
x | |
main |
x | |
dev |
x | |
prerelease |
x |
Physics is much more reliable on the main branches.
Glitches happens on (not limited to):
- prop_physics -> prop_physics
- prop_physics -> prop_static
- prop_physics -> func_detail
- prop_physics -> world brush
- prop_physics -> func_physbox(?)
- prop_physics can be replaced by other dynamic physics object as well.
How does it look like?
This can happen to happen in any kind of physics interaction, but is most notable with slider based trains. It is also best reproducible with said trains. Trains can be self build from props or be physics based prebuild trains from addons. In this particular use case of VPhysics one or more sliders will randomly glitch through the rail causing the train to spontaneously derail without an obvious case.
x86-64 branch, glitched:
main branch, working fine:
How to reproduce:
For easy and fast reproduction we tested it with these addons:
- SW Base (Code base for SW addons such as the train.)
- SW Western Loco (The Train)
- gm_construct_flatgrass_v6-2 (Map)
This issue is also independent from the map, but it is well reproducible on gm_construct_flatgrass_v6-2
. Any map with train tracks will be able to reproduce the issue. Source if needed for gm_construct_flatgrass_v6-2
is available in the Workshop page description.
- Install said or similar addons (issue is also present without those)
- Load up a train building map such as
gm_construct_flatgrass_v6-2
- Enable physics debug wireframe (
vcollide_wireframe 1
) - Spawn and on-rail a train such as the SW Western Loco.
- Watch the sliders.
They might glitch right away. - (Optional) Spawn and attach one or more wagons to the Loco for a more pronounced effect.
E on the couplers when they touch to attach or unattach them. - Give it a ride.
W to accelerate. Accelerating to half-speed should do it. - Watch the sliders.
They will glitch soon.
Reproduced on these platforms (not limited to):
- Windows (Server, Listenserver, Singleplayer)
- Linux (Server)
- Intel CPU (i9 9000'ish)
- Multiple AMD Ryzen CPUs
Additional Notes:
- Physics environment settings/convars issues have been ruled out. We checked them to be the same on all platforms.
- Issue is reproducible without addons, although a way harder.
- Shown addons and the map are proven to be reliable with a lot of testing put into them.
- The spinning wheels are parented. They are animation based and have no collision. They are not relevant to this issue.
- The likely cause are possible changes in the CS:GO VPhysics used in the affected branch.
Videos:
Train addon, x86-64, broken:
https://www.youtube.com/watch?v=O-C7Hg2PPeA
Prop Train, x86-64, broken, older video:
https://www.youtube.com/watch?v=Q1On4M3_hP4
Train addon, main, working fine:
https://www.youtube.com/watch?v=Sr2HsiQcRmE
Related:
- SW Addons - Bug Reports | Problem with the trains on x64 Chromium Beta
- #4756 (Possibly related)
- #4758 (Possibly related)