// if motor is working to leave the limit, we need an extra
// velocity constraint to model the motors contribution at the limit
if ( joint.motorTargetVelocity>0 && joint.motor>0) {
joint.extra.assign(
bi, bj,
new Vector3(), bi.isFixed()? new Vector3():bi.state.inverseinertia.multiply(axis), new Vector3(), bj.isFixed()? new Vector3() : bj.state.inverseinertia.multiply(axis.multiply(-1)),
new Vector3(), axis, new Vector3(), axis.multiply(-1),
0,
joint.motor,
null,
joint.velocity-joint.motorTargetVelocity, 0 );