Hi everyone!
I’m working on a small racing game. Cars should make unexpected and brusque movements. Using wheel colliders the car behaves like in the “real world”, but is not what I want.
Well, I’ve tried something using rigidbody.MoveRotation and rigidbody.MovePosition, inputs are really cool! But not the collision and response system (like the manual says), everything seems buggy…
I’ve tried another aproach, applying forces, but turn the car it’s really hard, well the track appers of ice…
Any sugestion?
Thanks in advance!
Hey!
You’ll probably want to dump physics as much as possible, and only use colliders to stop your vehicles falling through the floor and through objects. I’d reccommend creating a RigidBody that uses gravity - from there, use a script that moves the car through gameObject.GetComponent(Rigidbody).MovePosition(Vector3(xgain,ygain,zgain));, and store the cars last position in a variable. When you want to rotate, use gameObject.transform.rotation=Quaternion.Euler(x,y,z); (which you can also store in a variable to know the vehicles last rotation)
- by doing this you’ll be able to control the vehicles direction specifically.
Hope that helps!
@LukeB - Could you do a demo of this? Very rough, basic demo, just to show handling and how what you suggested worked. thanks