Hierarchy

Constructors

Properties

deviceIndex: number

the device index: mouse and touch are always 0, otherwise e.g. index of the connected Gamepad or XRController

isClick: boolean = false

true if this event is a click

isDoubleClick: boolean = false

true if this event is a double click

mode: XRTargetRayMode

Is the pointer event created via a touch on screen or a spatial device like a XR controller or hand tracking?

origin: object

The origin of the event contains a reference to the creator of this event.
This can be the Needle Engine input system or e.g. a XR controller

ray?: Ray

A ray in worldspace for the event.
If the ray is undefined you can also use space.worldForward and space.worldPosition

source: Event

the browser event that triggered this event (if any)

space: IGameObject

The device space (this object is not necessarily rendered in the scene but you can access or copy the matrix)
E.g. you can access the input world space source position with space.worldPosition or world direction with space.worldForward

Accessors

  • get immediatePropagationStopped(): boolean
  • Returns boolean

  • get pointerId(): number
  • Unique identifier for this input: a combination of the deviceIndex + button to uniquely identify the exact input (e.g. LeftController:Button0 = 0, RightController:Button1 = 101)

    Returns number

  • get pointerType(): PointerTypeNames
  • What type of input created this event: touch, mouse, xr controller, xr hand tracking...

    Returns PointerTypeNames

  • get propagationStopped(): boolean
  • Returns boolean

  • get used(): boolean
  • Returns boolean

    true if the event is marked to be used (when use() has been called). Default: false

Methods

  • Returns void

  • Returns void

  • Call to mark an event to be used

    Returns void

Generated using TypeDoc