NodeBaseMovable
- Last UpdatedDec 06, 2023
- 4 minute read
The NodeBaseMovable node extends NodeBase by adding support for moving 3D node content and for parenting.
Platform support
This node is fully supported on XR-Windows, XR-Portable Windows, XR-Portable iOS, XR-Portable Android, and XR-Portable WASM platforms.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
Full support |
Full support |
Full support |
Full support |
|
|
|
|
|
|
Derived nodes
Apart from item-type nodes, several other nodes such as Layer3D derive from NodeBaseMovable instead of from NodeBase.
Parenting
You can parent movable nodes by entering the name of any other NodeBaseMovable node into their parent field. This field is under the Transform category in the Graphic Context Editor Interface.
-
When parented, the child item becomes attached to its parent. This means that moving, rotating, or scaling the parent affects the child accordingly.
-
The child node transformations (scaleOffset, rotationOffset, positionOffset, scale, rotation, and position) are no longer applied starting from World coordinate system, but in their parent space.
-
Two or more items can have the same parent.
-
Parent nodes can be parented to other nodes to create a parenting hierarchy. For example, ItemA can have ItemB as parent and ItemB can have ItemC.
Code example
This node cannot be instantiated.
NodeBaseMovable fields
These are the fields for NodeBaseMovable node.
Only the node-specific fields are indicated, not those inherited from NodeBase.
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
matrix |
SMATRIX |
Optional |
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 |
This Matrix represent a space transformation that concurs to the final transformation of the node. It contributes to the node transformation as follows: TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, the World coordinate system is its parent. |
|
parent |
SSTRING |
Optional |
Not set |
Binds the node as child of another NodeBaseMovable node. When parented, the node space transformations are relative to the parent space. The node is bonded to its parent so that changes made to the space transformations of the parent affect the child instantly. |
|
position |
SVEC3 |
Optional |
0 0 0 |
Positions the Transform coordinate system. The Transform coordinate system is composed as follows: scale * rotation * position and it contributes to the node transformation as follows: TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, Parent corresponds to the World coordinate system (Identity). |
|
positionOffset |
SVEC3 |
Optional |
0 0 0 |
Positions the TransformOffset coordinate system. The TransformOffset coordinate system is composed as follows: scaleOffset * rotationOffset * positionOffset and it contributes to the node transformation as follows: TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, Parent corresponds to the World coordinate system (Identity). |
|
rotation |
SQUAT |
Optional |
0 0 0 1 |
Rotates the Transform coordinate system. The Transform coordinate system is composed as follows: scale * rotation * position and it contributes to the node transformation as follows: TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, Parent corresponds to the World coordinate system (Identity). This value of this field can be edited to any type of Eulerian representation of the rotation from the Graphic Context Editor Interface, if the editor preferences are set accordingly. |
|
rotationOffset |
SQUAT |
Optional |
0 0 0 1 |
Rotates the TransformOffset coordinate system. The TransformOffset coordinate system is composed as follows: scaleOffset * rotationOffset * positionOffset and it contributes to the node transformation as follows: TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, Parent corresponds to the World coordinate system (Identity). This value of this field can be edited to any type of Eulerian representation of the rotation from the Graphic Context Editor Interface, if the editor preferences are set accordingly. |
|
scale |
SVEC3 |
Optional |
1 1 1 |
Scales the Transform coordinate system. The Transform coordinate system is composed as follows: scale * rotation * position and it contributes to the node transformation as follows: TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, Parent corresponds to the World coordinate system (Identity). Note: Please be sure you understand space transformations concepts, if you want to apply non-uniform scale values to the node scale because results can be unpredictable. |
|
scaleOffset |
SVEC3 |
Optional |
1 1 1 |
Scales the TransformOffset coordinate system. The TransformOffset coordinate system is composed as follows: scaleOffset * rotationOffset * positionOffset and it contributes to the node transformation as follows: TransformOffset * Transform * matrix * Parent. In cases where no parent is expressed, Parent corresponds to the World coordinate system (Identity). Since the scaleOffset transformation is the first to be applied to the geometry, its behavior can be more intuitive to the users when using non-uniform scales. If the need to distort the geometry emerges, please consider using the scaleOffset field to achieve that result instead of using the scale field. |
|
visible |
SBOOL |
Optional |
true |
Hides/shows the item. |