Hi! I am writing my own car controller. And ran into a few issues with the unity physics engine. An example of these issues is shown in the attached video.
**I will briefly describe the problems.**
- The lack of stabilization of the movement of the car. With standard values of stiffness (1) on wheel colliders, the car is not able to go straight, but constantly goes into a skid. And vice versa, with a high stiffness value (3), the car stops skidding altogether.
- Torque is no longer supplied to the wheels when a larger drift angle is reached, which makes it impossible to make “donuts” (but that may not be the cause of the problem).
I tried many options for solving these problems, and so far I have settled on a not quite right, but somehow working solution.
I added a function to change the stiffness, depending on the angle of skidding and wheel slip. But it doesn’t seem right to do so…
Based on this, I have a few questions:
- How to forward stabilization?
- How to sideways stabilization?
- How to car “donuts”?
In the last part of the video, I show an example of what I would like to achieve in my controller.
Can anyone suggest something…
Torque transfer code:
foreach (WheelCollider wheelCol in motorWheels)
{
wheelCol.motorTorque = (torque / motorWheels.Count) * verticalInput;
}
Thanks for the link to the thread. I will start exploring alternatives to wheel colliders in unity =) All car controllers that are in the asset store do not meet my requirements. With their help, do not make a real, working game. They're nothing more than techno-demos (no offense, but that's unfortunately true...). I want to achieve the reference arcade physics as for example in "Underground 2". So I want to make my own controller, which I will use in my game, and maybe sell it in the asset store =)
– slamph_core