getReactionForce method

void getReactionForce(
  1. double inv_dt,
  2. Vector2 argOut
)
override

get the reaction force on body2 at the joint anchor in Newtons.

@param inv_dt @return

Implementation

void getReactionForce(double inv_dt, Vector2 argOut) {
  Vector2 temp = pool.popVec2();
  temp
    ..setFrom(_axis)
    ..scale(_motorImpulse + _impulse.z);
  argOut
    ..setFrom(_perp)
    ..scale(_impulse.x)
    ..add(temp)
    ..scale(inv_dt);
  pool.pushVec2(1);
}