is it possible to restrict the b2MouseJoint's rotation?

hi there,

i would like to make a little project, where the user can drag and drop items.
i successfully used a method similar to the one in the test.as example.
however, i would like to make the movement of the dragged object a little bit "uncorrect" as that it should not move so much around the mouse pointer but rather be dragged in a more classic way.

any idas of how i can achieve this?

thanks
If it's acceptable for the object to not rotate at all, you can set the body to have fixed rotation.
Otherwise, you could check the angle of the body each timestep, and manually apply some torque to keep it at the rotation you specify.
ok, thanks!
will have to look into the torque thing.
Also try setting angularDamping on the body when the joint is created, then unsetting it when the joint is destroyed. That'll allow a little bit of rotation for example if you smash the body up against a wall or something.

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