Private
_axisPrivate
_axisPrivate
_axisPrivate
_axisPrivate
_distancePrivate
axisPrivate
durationPrivate
calculateReturns the angle about specified axis to rotate the target to align with the camera. By projecting the forward/up vector onto planes defined by the relevant axis as the normal, we can separately calculate the angles of each axis. The separate calculations allow for each axis to have its own buffer / interpolation values. Because the user is expected to walk around freely, we use local X and Z axes for calculation, but global Y axis as the user's perception of 'up' is constant.
Private
calculateReturns the offset to move the target by based on the following vectors
the axis to rotate the target about
the current local position of the target relative to headlock center
the vector to calculate an origin of rotation to determine counterclockwise or clockwise rotation
the current look vector of the headlock controller
Optional
upVector: vec3Private
skip
HeadlockRotationCalculator is used to calculate the offset to position an object to maintain a certain offset relative to where the user is looking.