- Home /
Simple steering wheel rotation in a car
I'm semi-new to the whole Unity3D package, and I was wondering how I would attach a separate mesh (the steering wheel) to a physical body (the car that has physics) while keeping rotation values all nice and dandy, and then adding "Input.GetAxis("Horizontal")" on top of it all so that I end up with a steering wheel that is inside a car with physics that rotates according to user input - I'm currently using a Fixed Joint that does not allow me to do anything but to attach the steering wheel to the car - Thanks for any help.
Answer by Meater6 · Apr 16, 2011 at 04:18 PM
Make a empty the parent of the car mesh. This will have the rigidbody to add physics. Then make the car mesh a parent of the steering wheel. Then place the steering wheel where you want it, and add your rotation script to it. The steering wheel should now rotate around its own pivot point, and remain inside the car. Or you can put the steering wheel just inside the empty, and not in the mesh for organization.
I hope this helps
Thanks! I didn't realize that parent objects are at the start of a resource tree, with it's children listed below. :P
Your answer
Follow this Question
Related Questions
Car Front Tires rotation clamped between 270° - 90° 0 Answers
Internal collisions 1 Answer
Front wheel rotates in play mode 1 Answer
Car "burns rubber" 1 Answer