However often when I throw an object at another object the thrown object goes straight through the mesh for some reason. Both the meshes have collisions. Any ideas why this might be happening. Here is a video of the issue:
Hey! Have you tried activating Constant Collision Detection on the walls/surfaces? There’s a checkbox on each in the details panel that says “Use CCD”. It helps to increase the accuracy of collisions and could help solve the issue.
This is most likely physics tunneling, where a fast moving object skips collision between frames even though collisions exist. Enable Use CCD (Continuous Collision Detection) on the thrown object and ensure both actors are set to Block on the correct collision channels. Also avoid using Complex as Simple collision for physics and make sure the interaction system re-enables collision after releasing the object.
Awesome thanks this fixed it. Does this affect performance much? I would probably need to add this to every object in my scene. At least every thin object.
CCD can definitely be expensive, so only enable it when it’s required. Like with all things in development, it’s best to just use the profiling tools frequently to understand what impact it’s actually having on performance. The comment from dixlab above also has some good advice, so make sure you’re following that as well. Also just slowing down the projectiles can help prevent tunneling too.