The first part was mostly a "visual" question and may or may not look for a solution where the wheel movements are synchronized. I'll have to see the final game. If I can't find a suitable solution then I'll just "mask" the wheels and create fake rotation
However, for the immediate braking, I prefer actual physics. Applying impulse could immediately stop an objects movement but the current box2d version (WCK) seem to have function only for linear movement but not rotation. I even thought about adding an object with joints to stop wheel rotation. After reading about being able to create rigid bodies by adding objects to another object, I added two "wheels" to the body of the car and that seemed to work fairly well. The issue was that I either had to make the new wheel radius somewhat larger so that the actual wheel doesn't touch. Another way would've been to completely remove the wheel (and joint) but these methods seemed "too much work". I had a feeling that there was something simpler. After some more reading/exploring, I found the fixedRotation
property. Actually, I saw it earlier as the answer to keeping certain game characters upright, but it got lost within the many new features of Box2D/WCK. It worked almost perfect but in come cases the wheels kept rotating (though now in a continuous manner). That was solved by setting the wheel's angularVelocity
to zero.... and done. Looks exactly the way I wanted it
Of course, when the car isn't braking, you have to turn off fixedRotation
Lots of great stuff ... just have to find them.