This documentation is for a prerelease version of O3DE. Click here to switch to the latest release, or select a version from the dropdown.

Version:

Look-At Component

Use the Look-At component to force an entity to face another entity or position in your Open 3D Engine (O3DE) level.

Provider

O3DE Core (LmbrCentral) Gem

Look-At properties

Look-At component properties

PropertyDescriptionValuesDefault
TargetSets a target entity, the Forward Axis of the entity with the Look-At component will always point towards the Target entity.EntityIdNone
Forward AxisSets the axis that will always point towards Target entity.Y+, Y-, X+, X-, Z+, Z-None

LookAt

Request NameDescriptionParameterReturnScriptable
SetAxisSets the Forward Axis of the Look-At component.Axis: 0 - 5; 0 = X+, 1 = X-, 2 = Y+, 3 = Y-, 4 = Z+, 5 = Z-NoneYes
SetTargetSets the Target entity of the Look-At component.Target Entity: EntityIdNoneYes
SetTargetPositionSets the Look-At component to always point to a specific position.Target Position: Vector3NoneYes

LookAtNotification

Notification NameDescriptionParameterReturnScriptable
OnTargetChangedNotifies listeners when the Target entity of the Look-At component changes.NoneTarget Entity: EntityIdYes

For more information, see Working with the Event Bus (EBus) system.