getVelocityAtWorldPoint method

Vec3 getVelocityAtWorldPoint(
  1. Vec3 worldPoint,
  2. Vec3 result
)

Get world velocity of a point in the body. @param worldPoint; @param result; @return The result vector.;

Implementation

Vec3 getVelocityAtWorldPoint(Vec3 worldPoint, Vec3 result){
  final Vec3 r = Vec3();
  worldPoint.vsub(position, r);
  angularVelocity.cross(r, result);
  velocity.vadd(result, result);
  return result;
}