- Home /
Bike wobbles like pendulum after applying gravity
Hi, I'm new to unity and my goal is to develop bike racing game. Let me share what I've done so far, I've edited unity car sample project and placed Bike instead of User car and made small changes.. the problem is that bike wobbles when I try to take a turn and after that bike continues to wobble! Now how do I make it run steady and give it a small tilt while taking turn? I would really appreciate any kind of help!
(sorry if this question sounds stupid).
First of all, there are no stupid questions as long as you learn from them. As for your question, I'd like to see how you apply the gravity in the code. Also, can you tell how you set the wheel colliders? I might be able to help more with this information.
Answer by fueldown · Jun 03, 2013 at 06:00 PM
First of all, there are no stupid questions as long as you learn from them. As for your question, I'd like to see how you apply the gravity in the code. Also, can you tell how you set the wheel colliders? I might be able to help more with this information.
thanks.. 1- I applied gravity from unity by checking gravity checkbox checked. 2- the colliders are correct applied as tires rotates fine (gameobject => created empty => added two more gameobjects => added wheel colliders in each gameobject and applied to tires by setting up center with script) 3- $$anonymous$$ain point is that when bike starts moving and take a turn then bike wobbles for quite long like pendulum (moves from left to right and vice versa)
I've placed my project here
Please have a look when you get time. thanks
I also faced the same problem earlier. I fixed it by adjusting center of gravity / center of mass. Set it at lower end of the bike between two wheel colliders and touching the ground.
Hi, we are also facing same problem. But setting the center of gravity/ centre of mass is not solving the issue. If you could update in the above uploaded project it would have been of great help. Thanks.
Your answer
Follow this Question
Related Questions
Bike gravity fails 1 Answer
rotating/tilting the bike through accelerometer in unity. 1 Answer
How do I turn and tilt a bike with the iphone accelerometer? 1 Answer
Motorcycle/Bike Physics Trouble 5 Answers
Changing Gravity Quickly? 1 Answer