Tried creating a draggable sprite using b2MouseJoint but the joint had no Target attribute unless manually added, also meaning SetTarget is not a function of b2MouseJoint. Found it in source code but wont work in use.
You can give the MouseJoint a target attribute by using mouseJoint.target = new b2Vec2() and update it with the same sort of method but doing this means that the box isn't dragged, rather suspended from where the original click was.
Tried creating a draggable sprite using b2MouseJoint but the joint had no Target attribute unless manually added, also meaning SetTarget is not a function of b2MouseJoint. Found it in source code but wont work in use.
You can give the MouseJoint a target attribute by using
mouseJoint.target = new b2Vec2()
and update it with the same sort of method but doing this means that the box isn't dragged, rather suspended from where the original click was.