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

Makes an object look in a specific direction.

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

Syntax

C#

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

Parameters

 

gameObject
Type: GameObject
The object that will look at the given direction
direction
Type: Vector3
The direction that the object will look at, in world space
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