QuaternionExt.ApplyAlignment Method

Applies the transformation to make a rotation defined by sourceRotation rotate towards targetRotation.

Namespace: UltimateXR.Extensions.Unity.Math
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static void ApplyAlignment(
	this Quaternion self,
	Quaternion sourceRotation,
	Quaternion targetRotation,
	float t = 1f
)

Parameters

 

self
Type: Quaternion
Quaternion to apply the rotation to
sourceRotation
Type: Quaternion
Source rotation that will try to match targetRotation
targetRotation
Type: Quaternion
Target rotation to match
t (Optional)
Type: System.Single
Optional interpolation value [0.0, 1.0]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Quaternion. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

QuaternionExt Class
UltimateXR.Extensions.Unity.Math Namespace