LookAtAnimation
Description
This component creates an animation on an entity.
Properties
Property | Type | Default | Description |
---|---|---|---|
target | eid | undefined | The target object to track. |
targetX | number | 0 | The target x position (if no target is specified). |
targetY | number | 0 | The target y position (if no target is specified). |
targetZ | number | 0 | The target z position (if no target is specified). |
Functions
Get
Returns a read-only reference.
Example
ecs.LookAtAnimation.get(world, component.eid)
Set
Ensures the component exists on the entity, then assigns the (optional) data to the component.
Example
ecs.LookAtAnimation.set(world, component.eid, {
targetX: 0,
targetY: 0,
targetZ: 0
})