Manages interactions between Interactor and Interactable, and decides if events need to be transmitted to Interactable

Constructors

Properties

getInstance: (() => InteractionManager)

Methods

  • Removes an Interactable from the interaction manager's registry.

    Parameters

    Returns void

  • Removes an Interactor from the interaction manager's registry, so that it will no longer be considered when determining which interactors are interacting with interactables.

    Parameters

    Returns void

  • Dispatches an event in 3 phases:

    • Trickle-down: the event descends the hierarchy, from the first interactable ancestor of the target to its parent
    • Target: the event is sent to the target
    • Bubble-up: the event ascends the hierarchy, from the target's parent to its first interactable ancestor

    The eventArgs.origin is not included in the propagation path and the dispatch starts at eventArgs.origin child.

    Parameters

    Returns void

  • Returns all interactables that are set to the passed targeting mode.

    Parameters

    Returns Interactable[]

    an array of interactables that match the targeting mode

  • Returns all interactors that are currently targeting

    Returns Interactor[]

    An array of interactors that are targeting.

  • Adds an Interactable to the interaction manager's registry. This registry helps speed up calculations when raycasting objects in the scene.

    Parameters

    Returns void

  • Adds an Interactor to the interaction manager's registry, so it can be used to determine which {interactors} are interacting with interactables.

    Parameters

    Returns void