Fisica: accessing the underlying org.jbox2d.dynamics.Body object?
in
Contributed Library Questions
•
2 years ago
I've begun using Fisica because I ran into problems with Boxwrap2D not rendering on Android. Anyway... I have a quick (and hopefully not too noob-ish) question.
How might I go about accessing the underlying Body (org.jbox2d.dynamics.Body) object of an FBody (Fisica.FBody)? FBody doesn't extend Body, so I'm not sure how Richard is leveraging/interfacing with the JBox2D library. I'll start digging through the Fisica source code now to figure this out, but would appreciate the guidance of those wiser than me.
My reasons? While Fisica is great, I'd prefer to do most of my work with Vec2, and it seems there aren't many Fisica methods for this. For example, I find:
...preferable to the FBody alternative of:
Am I on the wrong path? Making a big, dumb mistake or two? Thanks in advance for the steer.
How might I go about accessing the underlying Body (org.jbox2d.dynamics.Body) object of an FBody (Fisica.FBody)? FBody doesn't extend Body, so I'm not sure how Richard is leveraging/interfacing with the JBox2D library. I'll start digging through the Fisica source code now to figure this out, but would appreciate the guidance of those wiser than me.
My reasons? While Fisica is great, I'd prefer to do most of my work with Vec2, and it seems there aren't many Fisica methods for this. For example, I find:
- Vec2 location = Body.getPosition();
...preferable to the FBody alternative of:
- Vec2 location = new Vec2(FBody.getX(), FBody.getY());
Am I on the wrong path? Making a big, dumb mistake or two? Thanks in advance for the steer.
1