relativeLocation method

Vector3 relativeLocation(
  1. Vector3 objectPosition,
  2. Offset offset
)

Implementation

Vector3 relativeLocation(Vector3 objectPosition, Offset offset){
  Vector3 zero = Vector3.zero();
  zero.applyMatrix4(lookAtMatrix);
  Vector3 newPosition = Converter.toVector3(objectPosition, offset);
  newPosition.applyMatrix4(lookAtMatrix);
  return Vector3.copy(newPosition-zero);
}