

Reference: Parameters: dir - the direction to map to the positive Z axis up - the vector which will be mapped to a vector parallel to the plane Rotation added by this method will be applied first! Vector v with the new quaternion by using Q * R * v, the Specified rotation, then the new quaternion will be Q * R.

If Q is this quaternion and R the quaternion representing the Parallel to the plane spanned by the up and dir vectors. Apply a rotation to this quaternion that maps the given direction to the positive Z axis, and store the result in dest.īecause there are multiple possibilities for such a rotation, this method will choose the one that ensures the given up direction to remain
