Introduction
The Interactor component provides the ability to interact with objects via raycast from the MainCamera to mouse cursor.
#
FieldsName | Description |
---|---|
Use 2D | Use interactor in 2D scene |
Use Mouse Button | Use mouse button to interact |
Mouse Button | Button used to interact |
Detection Mode | Type of detection to use |
Interaction Layer | Raycast layermask |
Emission Offset | Offset from the source to use when raycasting |
Emission Source | Source of the raycast |
Half Extends | Height used for cubecast |
Max Distance | Maximum allowed interaction distance |
Broadcast Events | Determines if events should also be sent to the Broadcaster |
Channel Name | Name of the channel on the Broadcaster to use |
On Interactable Found | Event raised when encountering a new interactable |
On Interactable Lost | Event raised when target interactable is no longer available |
#
PropertiesName | Description |
---|---|
activeUI | Gets the currently active UI for this object |
actor | Gets reference to the associated actor |
interactorComponents | Get list of interactor components associated with this object |
Target | Get/Set currently active interactable target |
#
MethodsName | Description |
---|---|
ColliderOrTriggerEnter | Register collider/trigger enter event |
ColliderOrTriggerExit | Register collider/trigger exit event |
GetInteractorComponent | Get a interactor component of a specific type |
InteractWithTarget | Interact with the current Target |
RefreshActor | Attempt to find actor for component |
RegisterInteractorComponent | Register a new interactor component |
RemoveInteractorComponent | Remove an interactor component from the list of registered components |