I have a wall in my 3D game which is relatively thin and it can be hit on both sides with objects that may occasionally be moving somewhat fast. Is there a reliable way to ensure that the colliding objects will be stopped on either side of the wall as opposed to simply passing through?
This one is easy
You just record the position of the object from the last physics tick and raycast from that location towards the objects velocity direction and if the raycast hits a wall you just move the object back to the walls position.
You usually want to add an additional check like this to all fast moving objects.
There is a builtin option in Rigidbody and I think also KinematicBody called continuous collision detection or CCD. It is supposed to do this for you, and with engine code (so much faster because it’s pure C++).
However I have read some posts here and there saying it doesn’t work properly.
This is a big help and makes a lot of sense! Thanks! :D
If you don’t do it like that, players will backwards long jump into a parallel universe