Code: Select all
// 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?