Optional
clientZSpatial input data
Readonly
devicethe device index: mouse and touch are always 0, otherwise e.g. index of the connected Gamepad or XRController
Readonly
intersectionsintersections that were generated from this event (or are associated with this event in any way)
true if this event is a click
true if this event is a double click
Readonly
metadatametadata can be used to associate additional information with the event
Readonly
modeIs the pointer event created via a touch on screen or a spatial device like a XR controller or hand tracking?
Readonly
originThe 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.
Implement onPointerHits
to receive the intersections of this event.
Readonly
sourcethe browser event that triggered this event (if any)
Readonly
spaceThe 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
true if this event has a ray. If you access the ray property a ray will automatically created
Returns true if the input was emitted in 3D space (and not by e.g. clicking on a 2D screen). You can use mode if you need more information about the input source
Unique identifier for this input: a combination of the deviceIndex + button to uniquely identify the exact input (e.g. LeftController:Button0 = 0, RightController:Button1 = 11)
What type of input created this event: touch, mouse, xr controller, xr hand tracking...
A ray in worldspace for the event.
If the ray is undefined you can also use space.worldForward
and space.worldPosition
The input that raised this event like pointerdown
true
if the event is marked to be used (when use()
has been called). Default: false
The Needle Engine Pointer Event is a custom event that extends the PointerEvent. It holds additional information like the device index, the origin of the event, the mode of the event (e.g. screen or spatial), the ray in world space, the space of the device, and more.