- Home /
The car flies away when wheel collider touch walls or other objects
So as title says my car just flies away when I drive into small objects, and if wall is vertical then wheel collider just stuck in this so i can't move. I've spent hours searching how to solve it but found nothing. There is script suspension but even when i turn it off it still doesn't work and other scripts shouldn't do this, so I don't know.
Answer by Edy · Dec 06, 2021 at 12:55 PM
Ensure that at least the top half of the WheelColliders are inside the colliders of the car. This way other objects will collide with the car's colliders, not with the WheelColliders.
WheelCollider are not solid colliders, just a representation of a vertical ray detecting collisions. When this ray suddenly falls inside other objects, the WheelCollider will react as if the suspension were instantly compressed, causing a huge reaction force pushing the car to the sky. Or if the ray is detecting a collision at the other side of the wall, then it will get stuck there.
More details and examples of placing WheelColliders in the car:
https://vehiclephysics.com/user-guide/3d-models/#vehicle-collider
https://twitter.com/VehiclePhysics/status/1465326183659282436