Motion
Get Motion

ReferenceScripting APIMotionScenepickItem

MotionScene.pickItem

method

Which of a 3D layer's items is under a point, as last drawn.

NamepickItem
Kindmethod of MotionScene
Called asscene.pickItem(…)
Since0.4

Syntax

pickItem(    layer: string,    x: number,    y: number): Promise<{ item: number; mote: Mote | null } | null>

Parameters

NameTypeDescription
layerstringThe 3D layer's name or id
xnumberAcross the scene, 0 to 1
ynumberDown the scene, 0 to 1

Returns

Promise<{ item: number; mote: Mote | null } | null>: a promise, next turn, of the item's number and its mote (if it's one's), or null.

See also

Mote