Unity: Spin wheels to move vehicle
Posted
by
Paul Manta
on Game Development
See other posts from Game Development
or by Paul Manta
Published on 2012-06-19T19:25:22Z
Indexed on
2012/06/19
21:25 UTC
Read the original article
Hit count: 409
I am just getting started with Unity and I'd like to ask a question. If I have a "Vehicle" object that has two children: "FrontWheel" and "BackWheel" (both 'wheels' are cylinders), how should I set everything up such that I can move the entire vehicle by turning its wheels?
When I apply a torque to "FrontWheel", the vehicle starts to move, but instead of the whole thing the moving together, the chassis is rolling on the cylinders and eventually falls off.
How can I prevent it from doing that?
© Game Development or respective owner