Quantcast
Channel: Latest Questions by SputnlK
Viewing all articles
Browse latest Browse all 4

How do i make my Raycast Car not slip at all?

$
0
0
hey, im trying to make a car with a rigidbody and rays for each wheel. the car gets vertical forces that are equal to a spring and a damper in real life and they work pretty good so far. forward movement is pretty simple for now but it works too. the problem is the sideways force. i cant figure out how to add the right force to make the wheels not slip at all. thats why im asking you to help me. i appreciate every bit of help. this is what i use to calculate the force that works against the x motion. (dont mind the if's) xForce = localHitVel.x; if (xForce 0) { body.AddForceAtPosition(transform.right * (xForce + xForceAdd), transform.position, ForceMode.VelocityChange); } ![alt text][1] [1]: /storage/temp/41378-xforce.jpg EDIT: Fixed it... i applied the "Magic Formula" by Pajecka http://en.wikipedia.org/wiki/Hans_B._Pacejka http://www.racer.nl/reference/pacejka.htm

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images