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

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
  • Returns PointerTypeNames

  • get propagationStopped(): boolean
  • Returns boolean

Methods

  • Returns void

  • Returns void

Generated using TypeDoc