Motion
Get Motion

ReferenceScripting APIMotionLayercontains

MotionLayer.contains

method

Whether a point of the scene is on this layer, as it was last drawn (its turn and scale in).

Namecontains
Kindmethod of MotionLayer
Called asscene.layer(…).contains(…)
As a nodeIs Point Over Layer (logic graph)
Since0.4

Syntax

contains(    x: number,    y: number): boolean

Parameters

NameTypeDescription
xnumberAcross the scene, 0 to 1
ynumberDown 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.