ReferenceScripting APIMotionScenepickItem
MotionScene.pickItem
methodWhich of a 3D layer's items is under a point, as last drawn.
| Name | pickItem |
|---|---|
| Kind | method of MotionScene |
| Called as | scene.pickItem(…) |
| Since | 0.4 |
Syntax
pickItem( layer: string, x: number, y: number): Promise<{ item: number; mote: Mote | null } | null>Parameters
| Name | Type | Description |
|---|---|---|
layer | string | The 3D layer's name or id |
x | number | Across the scene, 0 to 1 |
y | number | Down 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
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.