- Home /
Question by
habib_raycast · Sep 24, 2021 at 02:11 PM ·
rotationrigidbodyquaternionrotaterotate object
How to turn a car like in real world?
I want to turn my car like in the real world, rn I'm using **rb.transform.Rotate(0, value Time.deltaTime, 0);* but it looks like full body of car is rotating I just want to turn the wheels and apply accl and whooooo car turns and accl forward. How? Anyone?
,
Comment
Answer by Pangamini · Sep 24, 2021 at 09:19 PM
Basically when the car is turning, all four wheels' axes meet at a single point. Since the rear wheels are (usually) fixed, this point will lie on their shared axis. Try placing a point on this axis and align both front wheels' axes in that direction. You will notice that they are not turned by the same angle - and that's correct. When you do this, you can then rotate the whole car around this point. You can see it in action HERE
image-2021-09-24-231852.png
(26.8 kB)