A pivot is a node that serves as a pivot point for its child nodes and enables to easily control transformation (mainly rotation) of this group of nodes. It has virtually zero influence on performance and shares all common options that other nodes have.
The pivot node should be used when you need to set a specific pivot point for a node or a group of nodes. For example, a pivot node can be used to add a pivot point for:
- Landing gears of an aircraft so that they are geared down and up relative to this point.
- Propeller blades of a helicopter so that they are rotated relative to this point.
The pivot node has the pivot and local transformation matrices. The pivot transformation matrix sets transformation of the basis of rotation (the pivot point) of child nodes. The local transformation matrix sets local transformation of child nodes relative to the pivot point. Both matrices can be edited in the Parameters window of UnigineEditor: Node Tab -> Node Pivot section.
- The NodePivot class to edit pivots via API
Adding a Pivot Node#
To add a new pivot node via UnigineEditor do the following:
- Run UnigineEditor.
- On the Menu bar, click Create -> Node -> Pivot.
- Place the pivot node somewhere on the scene.
By default, the pivot and local transformation matrices of the added node are equal to identity matrices. You can change them in the Node tab of the Parameters window.
- Add child nodes to the pivot node: select the required nodes and drag the nodes inside the pivot node:
Editing a Pivot Node#
Editing the pivot node implies changing its pivot and local transformation matrices in the Node tab of the Parameters window.
You should distinguish between the concepts of the pivot node and the pivot point: changing transformation of the pivot point doesn't affect the pivot node and vice versa. By default, their transformations coincide.
Transformation of the pivot node is edited in the Common section of the Node tab in the Parameters window. To edit the pivot point transformation, you should select the pivot node and edit data in the Node Pivot section. As a result, 2 manipulators appear: the smaller manipulator for the pivot point and the bigger one for the pivot node. To change the pivot point transformation, press Edit Pivot and change the required pivot values in the Node Pivot section or transform the manipulator.
Changing position of the pivot point manipulator
Pivot node and pivot point with different transformations
Changing the local transformation of child nodes doesn't require pressing Edit Pivot: you can simply change the required local values in the Node Pivot section. You can also move, rotate or scale the pivot point manipulator by using the required transformation mode. For example: