I am creating a flight simulation game and have used the AeroplaneController provided by Unity’s basic assets. However, I found that adapting the controller to my own airplanes has caused issues with the wheels, so I switched the WheelCollider components for SphereColliders. This however caused a strange behaviour where the airplane would start slowly rotating on the y-axis only when it is stationary (zero velocity).
The aircraft is a Cessna and therefore has three wheels, the back one being slightly elevated. Not sure what is causing this strange rotation. The sphere colliders have a Slippery physic material applied.
I also have brakes in this game, implemented by changing the physic material dynamic friction to 0.2. This however causes the airplane (at zero velocity) to jitter and it appears like it is trying to rotate but can’t and moves back and forward very slightly. Any help, ideas or advice would be greatly appreciated!
I have tried to readjust the Rigidbody center of mass before and that didn’t seem to help but it’s something I can look into again. It looks like I’ll have to debug the specific forces acting upon the airplane.
I have already checked out the GitHub repo for airplane physics and the video that added throttle and flaps was where I got the idea to change the wheels from WheelColliders to SphereColliders!
Turns out the AeroplaneController script that I am using from the Unity basic assets was causing issues, specifically in the CalculateAerodynamicEffect. I adjusted the code to only trigger the effect at rigidbody velocities slightly above 0.
Unity’s physics system was working fine after all. Hope this helps someone out!