How to make a solid wall in Unity.

Hello all,I want to make a wall(basically a cube) solid so that my car model does not move through it.I have added rigidbody and collider to my car and box collider to the cube but the wall is simply not stopping my car.Can anyone guide me how to do this in unity.Thanks.

1)Make the collider of the wall(cube) slightly larger.

  1. Check whether the isTrigger checkbox is ticked in either of the colliders. If it is, untick it.

  2. Colliders sometimes fail to check collisions at very high speed in unity. If this is the case with you, use some other method for detecting collisions. Or goto step 1).

Try putting your cars movement in FixedUpdate() instead of Update(). I don’t know the details behind it but its fixed a few of my collision issues before.