Collision doesn't seem to work

I tried adding collision to meshes and also made them rigid bodies. But it doesn’t seem to work. My car can still pass through them

https://playcanvas.com/editor/scene/1072109

Mesh to mesh collision is not supported unfortunately.

We recommend using primitives or compound shapes where possible.

Still doesn’t work :frowning:

Ah, looking at controls, you are using translate and rotate which move the entity but not the rigidbody.

We can see this in the physics debug render script.

You will need to use forces and velocities on the rigid body to move it:

More information can be found here: https://developer.playcanvas.com/en/user-manual/physics/
And a tutorial here: https://developer.playcanvas.com/en/tutorials/Using-forces-on-rigid-bodies/

1 Like

Thanks for assistance. It helped me greatly

Do i have to write new scripts to rotate the entity or the old one will do?

You would need to use torque to rotate a rigidbody

1 Like