Move a body with pad

iainprice wrote:
...a sensor under the character but am having problems keeping it under an objct that can roll.


Sounds like you could use a body with fixedRotation set to true, with a sensor attached to it. Then join this to your rolling body with a revolute joint.
Yes thanks. I now have a circle with that rotates for the character and a non-rotating square as a sensor attached slightly below with a revolute joint. Nice.

But my circle doesnt stop fast enough. I have played with mass, friction etc but nothing seems to make the character stop quickly enough, I use apply impulse for left right and jump.... any suggestions?

Thanks.
Quote:
But my circle doesnt stop fast enough. I have played with mass, friction etc but nothing seems to make the character stop quickly enough, I use apply impulse for left right and jump.... any suggestions?

How do you mean not stop fast enough? Do you mean it still keeps going after you have applied an impulse, so it is kind of hard to control your character?
Try experimenting with a force in the opposite direction when releasing a pad / key button. Like setting the linearVelociy to 0, but the it stops very abruptly.

Original thread: https://box2d.org/forum/viewtopic.php?t=4873