Still new to flame and forge2d - both very impressive stuff.
I just learned that you need a MouseJoint
to move a (Body)Component so you dont mess with the physics in Forge2d/Box2d.
From this example - MouseJointSample I see that it does work for dragging the body - but after multiple onDragUpdate
and onDragEnd
I find it to get less and less reactive to the mouse move. Hope the following gif animation can visualise this.
Every time the mouse stands still, I release the mouse/touch, and re-onDragUpdate/onDragEnd
.
Do you see this and if so, what to do. This happens both on ios emulator and in Chrome web browser.
It looks like the mouseJoint
is never really destroyed, and I can make it react to mouse/touch away from the BodyComponent:
Note: I just git cloned flame (ba61779)
I think I found the bug, the code should be:
And not