- Home /
Let the Car-Wheels rotating, problem
i'm actually making a little car-game, and now i want that the car Wheels are rotating, the right java-script i have from a tutorial:
flWheel.Rotate(leftWheel.rpm / 60 360 Time.deltaTime, 0, 0);
how i have to do this in the project itself? every wheel have two parts, and they have to rotate. some ideas?
until now the wheels were rotating, but this in a big radius and not about its own axis. It made big bows around the car
here a picture of the setup:
http://www.imagebanana.com/view/n3khfhy8/dasda.PNG
if someone's better in german, response in german please
Answer by cowlinator · Mar 25, 2012 at 02:52 AM
If the wheels are not rotating around their axis, you need to change the pivot point for the object. Create an empty game object, and drag the wheel onto it in the hierarchy (so that the wheel becomes the 'child' of the empty game object). Then move the wheel in relation to the empty object (the pivot) until the pivot is exactly in the center of the wheel.
Your answer
Follow this Question
Related Questions
Instantiate problem in a RTS game 0 Answers
Rotation along the x-axis to that player can turn around? 1 Answer
OnTriggerEnter not firing in game view 0 Answers
Slenderman game noise 1 Answer
Internal collisions 1 Answer