- Home /
Increasing vehicle realism when turning
Hey guys,
We are working on a project that revolves around driving different types of vehicles. We have already created a basic driving mechanism that works very well, but one of the problems we are having is that the vehicles are obviously rotating around their middle (or more precisely, around their center of mass) which doesn't look too realistic. Moving the center of mass towards the front of the vehicle gave a bit better result, but it makes the vehicles more unstable on frontal collisions and bouncing when encountering terrain unevenness.
Our goal is to have the front wheels turn first and "pull" the rest of the car behind them.
We are not using wheel colliders, rather one rigidbody (attached to the body of the car) to which we add forces and torque.
The code itself is pretty simple, it calculates the turn vector with regards to car mass, user input and some other parameters that we added to each vehicle to differentiate them, and then add torque to the car rigidbody with regards to that vector.
My question is, have you encountered this problem, and what would be your suggestion on solving it?
Thanks
Do you really only want answers from people who have encountered this problem?
Of course not, just asking for input from anyone who might have constructive suggestions.
I didn't think so.
I haven't done a lot with rigid bodies but here's a question: can you make child objects where the wheels are, use AddForce on them and get the effect you want?
Another question is why aren't you using the built-in wheel stuff?
Answer by MaxGuernseyIII · Nov 03, 2017 at 07:15 PM
If it were me, I would try to make child objects where the wheels are and use AddForce on them to try and create this effect. You'll probably have to try to take friction into account when adding force. Like there's some force applied by the engine driving you forward or backward and there's some more "force" applied by the ground on wheels that are in contact with the ground.
If you factor it right, you could easily create N-wheel-drive vehicles. Put one on each wheel-simulator for four-wheel drive. Put only one on a single from wheel-simulator for a motorcycle or a three-wheeler. Et cetera.
Your answer
![](https://koobas.hobune.stream/wayback/20220612142422im_/https://answers.unity.com/themes/thub/images/avi.jpg)