- Home /
Front wheel joint disallowing turning.
So I've made a little car game without the car tutorial, meaning I only use the scripts I've written myself. I've found a great model that works like a charm, however the problem arises when I attempt to turn the front wheels. The front wheels are connected to the main vehicle using a hinge joint that allows it to turn on the X axis ( rotation for the wheel ). But now I can't turn the front wheels because of it. The hinge joint only allows it to spin, not turn. Because of this my question is as following: How can I make a frontwheel joint that will allow it to spin, but turn as well?
Answer by Edy · May 05, 2011 at 04:04 PM
Are you using WheelColliders? If so, then there's no need for using a hinge joint as the WheelCollider component will handle all the suspension and steering for you. The wheelColliders must be children of the car's rigid body, and must NOT rotate nor move in any way with respect to it. In order to simulate the wheel's spin and steering you must use different gameObjects and move/rotate them accordingly.
Here you have a good tutorial you can get the idea from:
http://carpe.com.au/slawia/2009/08/unity-wheel-collider-introduction/
Your answer
Follow this Question
Related Questions
Pushing a cart with a vehicle (Not generating initial torque) 0 Answers
How to make a basic vehicle 3 Answers
Stuck in Car tutorial - Wheels 0 Answers
Car flips when it turns 1 Answer
A game like Need For Speed? 1 Answer