- Home /
How to rotate at the same rpm wheels of a tank?
I have a tank with 12 wheelcolliders and I calculate their rpm so I rotate the wheelgraphic in relation to this value. The problem is that sometimes the wheels don't rotate at the same rpm, It's quite difficult to say, so try wheelsrpmexample and go forward. If u move your mouse and focus on the wheels, u'll see what I mean.
Please help!!
Answer by Bunny83 · Dec 19, 2011 at 04:56 PM
I never used wheelcolliders, but it looks like they behave as they should. Your problem is that each collider works on it's own. At a steep hill some colliders might not touching the ground and due to acceleration they start spinning quite fast.
Unfortunately you can't set the RPM manually (since it's readonly). You should use WheelCollider.GetGroundHit to figure out if the wheel touches the ground and react in some way when it's "flying". You could use the same RPM for all wheels and just calculate the average of all "grounded" wheels. It doesn't matter if the collider is spinning that fast. Just move the wheels at the same speed.
edit: Of course you should do this on each side seperately ;)
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to move caterpillars of a tank? 1 Answer
How to make a tank move/follow a path? 1 Answer
How to turn a tank? 1 Answer