// get the axis in local coordinates this.xAxis = body2.getLocalVector(n); // get the perpendicular axis

while in box2D it is in frame of body 2

The joint axis is the line along which the bodies can move relative to each other. It is specified in bodyA's local coordinates, so you could think of it as the direction bodyB can move from bodyA's point of view.

Is it intentional?

2. in dyn4j prismatic joint there is single local anchor point (actually in only defined constructor, same world point is used to create two local anchor points), while in box2D there are 2 local points, why it is so?

It wasn't intentional to make the axis fixed in body A or B's space. Instead, it was arbitrarily chosen when I did my own derivation of the joint here.

They look the same to me, am I missing the question? Both dyn4j & box2d (b2PrismaticJointDef::Initialize) accept one world space anchor point and then create, internally, two local space anchor points.

Ok got it...Actually dyn4j does't allow to change local anchor point while box2d does so. What if we want to define local anchor points of both bodies separately, without bringing desired local point to common point.

Meanwhile I have created separate eclipse test project for dyn4j library using graphicsRenderer2D with support for mouse drag zoom etc. Just add dyn4j.jar to its build path.If you like it , you may make it available publically.regards..

maheshkurmi wrote:What if we want to define local anchor points of both bodies separately, without bringing desired local point to common point.

What would be the goal for being able to change these?

maheshkurmi wrote:Meanwhile I have created separate eclipse test project for dyn4j library using graphicsRenderer2D with support for mouse drag zoom etc. Just add dyn4j.jar to its build path.If you like it , you may make it available publically.regards..

Cool, did you use the new samples framework classes? I really like the ragdolls in the Cyclist sample.