0
\$\begingroup\$

Racing game with a single mesh to act as a collider for all the track sides. Recently revised the mesh and now it is behaving strangely. The player correctly collides (bounces off) some parts, on other parts it is hit and miss whether the collider works and on others the player acts like there is no collider present at all.

I have checked that all the meshes normals are facing the correct direction and that there are no gaps in the mesh.

I have set the collisions on the player rigid body to be continuous.

Can anyone suggest what might be happening?

I was previously using the exact same technique but re-created the collider mesh to clean it up and upon importing from Blender into Unity the collider behaviour is now all over the place.

enter image description here

This picture shows part of the collider where the player just passes straight through the walls.

Car collider in Unity: enter image description here

Track mesh collider in Unity: enter image description here

\$\endgroup\$
  • \$\begingroup\$ Can you show us how your colliders (track and car) are configured in the inspector, and how your code moves your car? \$\endgroup\$ – DMGregory Feb 12 at 13:19
  • \$\begingroup\$ I've added the collider inspector info. I can't understand how part of the mesh can be working as a collider and other parts aren't. \$\endgroup\$ – Glasshalfpool Feb 12 at 14:17
  • \$\begingroup\$ Welcome to the site! Are you using the mesh that the MeshCollider automatically creates or have you specified your own? Could it be that the collider is still using mesh data from before your revisions? \$\endgroup\$ – McAden Feb 12 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.