IN THIS ARTICLE
Actor Component
You can use the Actor component to create characters for your game. After you import your character files from your DCC tool into O3DE, you can create an entity and add the Actor component to it. You must use an Actor component to create a controllable character for your game.
Provider
Dependencies
You must also add one of the following components:
- Simple Motion component - Use a single motion for your actor.
- AnimGraph component - Use an animation graph to control your actor’s motions.
Actor Component Properties
Property | Description | Values | Default |
---|---|---|---|
Actor asset | Sets the actor asset for this component. | Actor Asset | None |
Attach To - Attachment type | Sets the type of attachment to use when attaching to the target entity. | None , Skin attachment | None |
Attach To - Target entity | Sets the entity to attach to. This field is available only if Attachment type is set to | EntityId | None |
Render options - Draw skeleton | Draws the actor’s joints. | Boolean | Disabled |
Render options - Draw character | Draws the actor’s mesh. | Boolean | Enabled |
Render options - Draw bounds | Draws the actor’s bounding box. | Boolean | Disabled |
Render options - Skinning method | Sets the skinning method to use for the actor. | Dual quat skinning , Linear skinning | Dual quat skinning |
Out of view - Force update Joints | Updates joint transforms when the actor is out of camera view. | Boolean | Disabled |
Out of view - Bounding box configuration - Bounds type | Sets the method used to compute the actor’s bounding box. | Static , Bone position-based , Mesh vertex-based | Static |
Out of view - Bounding box configuration - Automatically update bounds? | If This field is available only if Bounds type is set to | Boolean | Enabled |
Out of view - Bounding box configuration - Update frequency | Sets the frequency of bounding box updates in hertz. This field is available only if Bounds type is set to | 0.0 to Infinity | 0.0 |
Out of view - Bounding box configuration - Update item skip factor | Sets bounding box updates to only calculate bounds based on every nth item (bone or vertex), where n is the Update item skip factor. This field is available only if Bounds type is set to | 1 to Infinity | 1 |
Out of view - Bounding box configuration - Expand by | Expands the dimensions of a calculated bounding box by a percentage. | -99.999 to Infinity | 25.0 |
ActorComponentRequestBus
Request Name | Description | Parameter | Return | Scriptable |
---|---|---|---|---|
AttachToEntity | Attaches an attachment to an target entity at a specific joint index. | Target: EntityId, Joint Index: Integer | None | Yes |
DebugDrawRoot | Draws the root of the actor. | Boolean | None | Yes |
DetachFromEntity | Detaches an attachment from the entity it is attached to. | None | None | Yes |
GetJointIndexByName | Returns the joint index of a specific joint. | Joint Name: String | Joint Index: Integer | Yes |
GetJointTransform | Returns a specific joint’s transform. | Joint Index: Integer, Joint Space: Integer | Transform: Quaternion | Yes |
GetRenderCharacter | Returns True if the actor is rendered. | None | Boolean | Yes |
SetRenderCharacter | If True , renders the actor. | Boolean | None | Yes |
ActorComponentNotificationBus
Request Name | Description | Parameter | Return | Scriptable |
---|---|---|---|---|
OnActorInstanceCreated | Notifies listeners when an actor instance is created. | None | Actor Instance | Yes |
OnActorInstanceDestroyed | Notifies listeners when an actor instance is destroyed. | None | Actor Instance | Yes |
ActorNotificationBus
Notification Name | Description | Parameter | Return | Scriptable |
---|---|---|---|---|
OnMotionEvent | Notifies listeners when a motion event begins. | None | Motion Event: Motion | Yes |
OnMotionLoop | Notifies listeners when a motion begins a new loop. | None | Motion Name: String | Yes |
OnStateEntered | Notifies listeners when the transition to a specific state is complete. | None | State: String | Yes |
OnStateEntering | Notifies listeners when the transition to a specific state has started. | None | State: String | Yes |
OnStateExited | Notifies listeners when the transition from a specific state is complete. | None | State: String | Yes |
OnStateExiting | Notifies listeners when the transition from a specific state has started. | None | State: String | Yes |
OnStateTransitionEnd | Notifies listeners when a state transition has completed. | None | New State: String, Old State: String | Yes |
OnStateTransitionStart | Notifies listeners when a state transition has started. | None | New State: String, Old State: String | Yes |