Skip to main content

Introduction

The Interactor component provides 3D objects with the ability to interact with the environment via raycasting.

"Interactor"

Fields#

NameDescription
Detection ModeType of detection to use
Interaction LayerRaycast layermask
Emission OffsetOffset from the source to use when raycasting
Emission SourceSource of the raycast
Half ExtendsHeight used for cubecast
Max DistanceMaximum allowed interaction distance
Broadcast EventsDetermines if events should also be sent to the Broadcaster
Channel NameName of the channel on the Broadcaster to use
On Interactable FoundEvent raised when encountering a new interactable
On Interactable LostEvent raised when target interactable is no longer available

Properties#

NameDescription
activeUIGets the currently active UI for this object
actorGets reference to the associated actor
interactorComponentsGet list of interactor components associated with this object
TargetGet/Set currently active interactable target

Methods#

NameDescription
ColliderOrTriggerEnterRegister collider/trigger enter event
ColliderOrTriggerExitRegister collider/trigger exit event
GetInteractorComponentGet a interactor component of a specific type
InteractWithTargetInteract with the current Target
RefreshActorAttempt to find actor for component
RegisterInteractorComponentRegister a new interactor component
RemoveInteractorComponentRemove an interactor component from the list of registered components