UxrLookAt.MakeLookAt Method (GameObject, Transform, Boolean, Boolean, Boolean)
Makes an object look at a specific target.
Namespace: UltimateXR.Animation.Transforms
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static void MakeLookAt(
GameObject gameObject,
Transform target,
bool allowRotateAroundVerticalAxis,
bool allowRotateAroundHorizontalAxis,
bool invertedForwardAxis
)
Parameters
- gameObject
- Type: GameObject
The object that will look at the target - target
- Type: Transform
The target - allowRotateAroundVerticalAxis
- Type: System.Boolean
Should the lookAt alter the rotation around the vertical axis? - allowRotateAroundHorizontalAxis
- Type: System.Boolean
Should the lookAt alter the rotation around the horizontal axis? - invertedForwardAxis
- Type: System.Boolean
If true, the target’s forward axis will try to point at the opposite direction where the target is. By default this is false, meaning the forward vector will try to point at the target
See Also
Reference
UxrLookAt Class
MakeLookAt Overload
UltimateXR.Animation.Transforms Namespace