TransformExt.ApplyAlignment Method (Transform, Transform, Transform, Boolean, Boolean, Single)
Applies the transformation required to make sourceAlign align with targetAlign.
Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static void ApplyAlignment(
this Transform self,
Transform sourceAlign,
Transform targetAlign,
bool rotate = true,
bool translate = true,
float t = 1f
)
Parameters
- self
- Type: Transform
Transform to apply the alignment to - sourceAlign
- Type: Transform
Source reference that will try to match targetAlign - targetAlign
- Type: Transform
Target reference - rotate (Optional)
- Type: System.Boolean
Allows to control whether to rotate or not - translate (Optional)
- Type: System.Boolean
Allows to control whether to translate or not - t (Optional)
- Type: System.Single
Optional interpolation value
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