vectorToLocalFrame static method

Vec3 vectorToLocalFrame(
  1. Vec3 position,
  2. Quaternion quaternion,
  3. Vec3 worldVector, [
  4. Vec3? result,
])

Implementation

static Vec3 vectorToLocalFrame(Vec3 position,Quaternion quaternion,Vec3 worldVector, [Vec3? result]){
  result ??= Vec3();
  quaternion.w *= -1;
  quaternion.vmult(worldVector, result);
  quaternion.w *= -1;
  return result;
}