converting iforce tutorial examples to planck, couple of bugs found
angle on rotating objects seems to increment without limit, which is ok however, getAngle returns these ever-increasing numbers, suggest modding to -360 to 360 to facilitate position testing
iforce box2d world tutorial explains using setGravity however I tried running it up and down on a key press and it locked my app https://editor.p5js.org/Bobcook47/sketches/S2RqS8ie- when is it safe, if ever, to call setGravity
ps: if anyone knows how to get a mousejoint to work outside the testbed, please let me know
suggest modding to -360 to 360 to facilitate position testing
Planck closely follows Box2D API, if this is how Box2D works we can change it.
however I tried running it up and down on a key press and it locked my app
It needs to be setGravity(Vec2(0, gravity)).
MouseJoint needs three parameters:
bodyA - a ground body (I guess this is not used) bodyB - a body that is dragged by mouse target - a point in world frame that bodyB is dragged towards
To make bodyB follow the mouse, you need to call joint.setTarget(target) as the mouse moves.