I’m simulating a small aeroplane and I was using WheelColliders in Unity 4.5 for the wheels. Since switching to Unity 5 the wheels resist any kind of external forces. When I spin up the propeller and apply forces to the Rigidbody, the plane flips onto its nose!
Here’s the problem demonstrated on a cube with wheels:
The wheels are default WheelColliders, the cube has mass 2000 and I’m applying a force of 10,000 using a very simple script:
public class Truck : MonoBehaviour
{
bool push;
void Update() {
push = Input.GetKey("p");
}
void FixedUpdate() {
if (push)
GetComponent<Rigidbody>().AddForce(new Vector3(0, 0, 10000));
}
}
Other experiments:
- The truck will roll if you apply a small force before the truck “lands” when the level starts, so it hits the ground rolling ever so slightly.
- The truck will also roll if you incline the slope to greater than 1.4 degrees (??). Anything less than that and it stays glued to the ground.
What’s going on here?