Skip to content

relativeTo( )

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

relativeTo() : Node[];

Gets an array of nodes that this node’s location is relative to.

For more information see:

Default value: []

The array of nodes that this node’s location is relative to.

// Accessing one of the elements of the returned array, in this case the first element.
var r = myobject.relativeTo()[0];
if (r === Z.screenRight) {
// myobject is located relative to the right of the screen
}