- Home /
how do i fix my car violently shaking?
my car that uses wheel colliders is shaking and i dont know how to fix it. I am willing to change anything about the car to get it fixed except for the mass and friction of the wheels.
here is a video showcasing the problem: https://streamable.com/o4qslf
here are my wheel collider properties if that helps
the mass of the vehicle is 1000
i tried adding the sub-step parameters and it worked! now i just need to stop the car from sliding when i turn, any help with that?
Answer by Vibertex · Apr 08, 2020 at 09:46 PM
@Glowball123 Try copying this and slowly!
HEY!
That is my picture I sent you
You cant use that it is my code on my 3D car game!
I have proof I sent that on discord to him
It is absolutely hilarious to me that you would suggest someone cant use it because "that's your code" that is most certainly NOT your code. Its not even code buddy. I had to comment when I saw your ridiculous reply to someone trying to help someone else out.
What you got there is predefined values for someone elses code. Wheel colliders are made by unity. Not you.
Furthermore, Even if initial values to someone elses script was something you could claim to be yours and only for your game. Its not even from you. These exact values can be found in an official unity tutorial... So
Nice try buddy. Stop being so sucky. You wouldnt even be allowed to use unity without the good gracious of people willing to give their hard work for free.
You didn't contribute Unity Engine, so you can't use it. ?
Answer by Vipertex13 · Apr 06, 2020 at 11:38 PM
You should try increasing the spring and damper The rest is a little weird try changing suspension distance or force from the app point distance
Answer by Glowball123 · Apr 08, 2020 at 08:22 PM
i did and its still shaking
Try setting the setting the sub-step parameters: http://docs.unity3d.com/ScriptReference/WheelCollider.ConfigureVehicleSubsteps.html
I can't remember what values I used and I'm not really sure how they affect things exactly, just tested some values like (5, 12, 15) and all the jitter stopped, without changing the suspension of the wheel (the car should move without jitter without forcing a fixed suspension or time scale). Like it's explained in the docs, you only need to set this once for a wheel collider and every wheel collider.
Try changing the Sideways friction and forward friction
Answer by juzimmer · Dec 03, 2021 at 12:38 AM
Lower your center of mass.
Try
float reduceCenterMassY = -1;
_rigidbody.centerOfMass = new Vector3(_rigidbody.centerOfMass.x, reduceCenterMassY , _rigidbody.centerOfMass.z);
Add a game object to your script so you can visualize where exactly on your vehicle the world center of mass is. Lowering your local center of mass effectively lowers your world center of mass.
Answer by poken21 · Mar 31 at 02:55 PM
https://www.youtube.com/watch?v=hIBW7e0nQNM
try what he does at 8:02