I’m trying to use raycasts to detect hits on certain meshes.
When none of the meshes moves, this works fine. However, in my project some of the meshes move around (they’re all simple box meshes). When I create a static physics body for one of these meshes, I want to update the body’s position to the mesh’s position each frame, so raycasts can hit it (rotations or billboarding is not required).
Using a dynamic or animated body makes moving the associated mesh no longer possible when setting it’s position.
Thanks, that does the trick!
Just to check, more computationally expensive than what exactly?
And there’s no way to just force-set the body to a certain world position which would be cheaper to do? In my case, I’m just using the meshes to check if a ray can hit it, not using collisions or other physics.