Skip to content

setValue()

Set the tracker's position within the pad.

Positions outside the pad are clamped to its edges. Moves the tracker to match, and calls its update function.

Parameters

Once an object xypad has been created, you can use the following function:

xypad.setValue(x, y)
Parameter Type Default Description
x int or float required The new horizontal position within the pad, in pixels.
y int or float required The new vertical position within the pad, in pixels.