/// <summary> /// Transforms the given axis by the object's orientation. /// </summary> /// <param name="axis">Axis to transform.</param> /// <returns>The transformed axis.</returns> private Vector3 TransformVector(Vector3 axis) { return(QuaternionMath.TransformVectorByOrientation(axis, _orientation)); }
/// <summary> /// Rotate the object around the given axis. /// </summary> /// <param name="angle">Angle to rotate by.</param> /// <param name="axis">Axis to rotate around.</param> private void Rotate(float angle, Vector3 axis) { _orientation = QuaternionMath.RotateAxis(angle, axis, _orientation); }