TransformExt.ApplyAlignment Method (Transform, Quaternion, Quaternion, Single)

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

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

Syntax

C#

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

Parameters

 

self
Type: Transform
Transform to apply the alignment 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 Transform. 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

TransformExt Class
ApplyAlignment Overload
UltimateXR.Extensions.Unity Namespace