UxrLookAt.MakeLookAt Method (GameObject, Transform, Vector3, Boolean, Boolean, Boolean)

Makes an object look along a specific target’s direction.

Namespace: UltimateXR.Animation.Transforms
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static void MakeLookAt(
	GameObject gameObject,
	Transform target,
	Vector3 direction,
	bool allowRotateAroundVerticalAxis,
	bool allowRotateAroundHorizontalAxis,
	bool invertedForwardAxis
)

Parameters

 

gameObject
Type: GameObject
The object that will look at the target
target
Type: Transform
The target
direction
Type: Vector3
The direction in target’s coordinate system
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