Closed Gmod4phun closed 8 months ago
Contacts should get refreshed on tag change now. Let me know if you find any other situation where contacts should get refreshed.
https://github.com/Facepunch/sbox-issues/assets/1667289/3b02e2c4-328a-443b-b26b-80f3698b9c73
Seems to work flawlessly now, thanks again. If I find anything that needs similiar adjustments I will let you know.
Describe the bug
As is written in the collision matrix description, moving objects away from each other should clear the cache.
This seems to be the case indeed, however, there is a slight problem. When you change an object's tags so that it should no longer collide with another object, the objects will continue to collide with eacother unless they are moved away from each other, clearing the cache.
I believe it would be an excellent idea to clear the cache when a change to gameobject's tags occurs, otherwise things can collide with shit that it has no business colliding with.
To Reproduce
Expected behavior
Immediate clearing of the cache after a gameobject's tags are changed.
Media/Files
Demonstration video: I spawn a barrel prop on top of a plane, after half a second the prop is moved to a different 'world' where it should no longer collide with the plane (the prop's tags are changed to ignore the plane). Notice that it still collides with the plane until it moves further away from the plane, then the physics updates properly.
https://github.com/Facepunch/sbox-issues/assets/5991682/ad5c90a7-1340-404f-a624-2cf190b159f5
Additional context
No response