Skip to main content

Function: addUiWorldSpaceFollowComponent()

addUiWorldSpaceFollowComponent(world, entity, options): UiWorldSpaceFollowEcsComponent

Defined in: ui/components/ui-world-space-follow-component.ts:29

Attaches a UiWorldSpaceFollowEcsComponent to entity, read by createUiWorldSpaceFollowEcsSystem.

Parameters​

world​

EcsWorld

The ECS world entity belongs to.

entity​

number

The entity to attach the component to - typically a world-space canvas root (see createUiCanvas's renderMode: 'worldSpace').

options​

UiWorldSpaceFollowEcsComponent

Options for configuring the follow relationship. target has no sensible default and must always be provided.

Returns​

UiWorldSpaceFollowEcsComponent

The attached component, for further tuning or runtime changes.