Skip to main content
Represents a pointer interaction event containing position and pointer id.

Fields

position

The position of the pointer in local coordinates.

id

The unique identifier for the pointer.

type

The type of event (pointerDown, pointerUp, click, pointerEnter, pointerMove, etc).

Constructors

new

Creates a new PointerEvent with the given id and position.

Methods

hit

Consumes the event. Call it on every event a script owns — the press, each move of a drag, and the release — or the event keeps travelling outward and an enclosing hit target claims the gesture. A ScrollConstraint viewport is the usual one: without this, dragging a control inside a scroll view scrolls the view instead. The argument inverts. Bare hit() is opaque and stops there; hit(true) marks this target translucent, so the event continues to whatever is behind it.