API reference
API reference
Select your platform
No SDKs available
No versions available

PointerEvent Struct

Extends IEvent
Created and emitted to encapsulate the relevant information of a "pointer interaction," which is an interaction the user conducted by conceptually "pointing at" something.
This event contains information about the interactor (canonically a PointerInteractor<TInteractor, TInteractable>) which originated the interaction, what type of interaction it was, where it occurred, and relevant ancillary data.

Properties

The IInteractorView.Identifier associated with interactor which originated the interaction represented by this event.
This identifier is uniquely associated with a single interactor instance in the experience.
A unique value associated with this specific event, meaning the semantic occurrence at a specific point in time which motivated the creation of this data object.
A characterization of the type of interaction this event represents.
Each PointerEvent can represent only one simple interaction, and complex interactions (for example, an interactable being deselected by one interactor in order to be selected by another) must consequently be represented by multiple sequential PointerEvents.
The world-space position associated with the represented interaction.
The precise meaning of this Pose varies based on the interaction Type and what kind of interaction it is: a PokeInteractor's PointerEventType.Select might designate the pose of the interactor at the moment of selection, a GrabInteractor PointerEventType.Move might designate the expected pose of the interactable based on the behavior of the relevant IMovement in the most recent processing frame, etc. PointerEvent thus does not specify a unique, precise contract for this value, and the responsibility for interpreting this pose correctly belongs to the handler.
A generic metadata property used for a variety of purposes in Interaction SDK logic.
Though this property is public, it has no formal contract, and consequently it is generally not safe to assume that any specific piece of information is available through this property on any instance at any time.

Member Functions

Constructor for new PointerEvents.
Parameters
identifier
The IInteractorView.Identifier of the originating interactor
type
The PointerEventType which most accurately characterizes the represented interaction
pose
The world space position and orientation associated with this interaction
data
Contractually undefined metadata
Did you find this page helpful?
Thumbs up icon
Thumbs down icon