pointToLocalFrame method

Vec3 pointToLocalFrame(
  1. Vec3 worldPoint,
  2. Vec3? result
)

Convert a world point to local body frame.

Implementation

Vec3 pointToLocalFrame(Vec3 worldPoint,Vec3? result){
  result ??= Vec3();
  worldPoint.vsub(position, result);
  quaternion.conjugate().vmult(result, result);
  return result;
}