pheelbert wrote:but I need to feed in an absurdly big number in body.applyImpulse for it to acheive way less than I would want it to.
I'd like to be able to make stuff move fast against gravity given a huge impulse, for example.
When you create the Ellipse, what is the width/height that you are using? Remember, dyn4j uses the MKS (meter-kilogram-second) unit system. For example, if you do new Circle(1.0), you've create a 1 meter radius circle, in other words a circle the height of 1 story building. So, if you are passing in pixel values, you will have one heavy object, which will require an enormous force to move. I suspect this is why you've set gravity to 200 m/s^2 as well? If that's not the case can you report back what body.getMass().getMass() is?
Typically, you'll define a constant somewhere that defines the number of pixels per meter and use that to scale any values you send to dyn4j. The default that the Sandbox app uses is 32 pixels / 1 meter. So 256 pixels would be 256 / 32 = 8 meters.
pheelbert wrote:PS: Are the fixtures' translation position their center or top left?
The body.getWorldCenter() returns the center of mass of the body, which may not correspond to the geometric center of the body. Some shapes, Ellipse for example, will always have their center at the origin (0, 0) at creation. The center of mass of an ellipse happens to be the geometric center of the ellipse as well. So, before calling body.translate, body.getWorldCenter() should return (0,0). The translate method, in effect, moves the center of mass. So, in this case body.getWorldCenter() would return whatever you passed in the translate method.
You can get the fixture's center, which is always the geometric center, by doing: body.getWorldPoint(body.getFixture(0).getCenter()); You can get the current top left position by: body.getFixture(0).createAABB(body.getTransform()); and looking at the max y and min x values. Note, that the AABB can change if the body/fixture is rotated.
William