ReferenceScripting APIMotionLayercontains
MotionLayer.contains
methodWhether a point of the scene is on this layer, as it was last drawn (its turn and scale in).
| Name | contains |
|---|---|
| Kind | method of MotionLayer |
| Called as | scene.layer(…).contains(…) |
| As a node | Is Point Over Layer (logic graph) |
| Since | 0.4 |
Syntax
contains( x: number, y: number): booleanParameters
| Name | Type | Description |
|---|---|---|
x | number | Across the scene, 0 to 1 |
y | number | Down the scene, 0 to 1 |
Returns
boolean: true when the point is on it.
Remarks
false at first, until the layers' places are known (a moment after it's first asked), and for a layer not drawn.
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.