This page has been translated automatically.
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Pivot

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.

Propeller Blades are Rotated Relative to a Pivot 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 via the Nodes panel of UnigineEditor.

See also

  • A NodePivot class to edit pivots via UnigineScript

Adding a Pivot Node

To add a new pivot node via UnigineEditor, click Create -> Node -> Pivot on the Menu bar and then click somewhere in the scene to add the pivot node.

Place a Pivot Node

By default, the pivot and local transformation matrices of the added node are equal to identity matrices. You can change them on the Pivot tab of the Nodes panel.

Then you should add the child nodes to the pivot node: select the required nodes, hold Alt and drag the nodes inside the pivot node:

Adding Dynamic Meshes as Child Nodes to the Pivot Node

Editing a Pivot Node

Editing the pivot node implies changing its pivot and local transformation matrices on the Pivot tab of the Nodes panel.

Pivot Node Settings

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 on the Node tab of the Nodes panel. To edit the pivot point transformation, you should select the pivot node and switch to the Pivot tab. As a result, 2 manipulators will 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 values on the Pivot tab or transform the manipulator.

Changing Position of the Pivot Point Manipulator
Pivot Node and Pivot Point with Different Transformations

Changing the local transformation of the child nodes doesn't require pressing Edit pivot: you can simply change the required values on the Pivot tab. You can also move, rotate or scale the pivot point manipulator by using the required transformation mode. For example:

Child Nodes Rotating Relative to Pivot Point

Notice
If the Edit pivot button is pressed, changing the pivot point manipulator will change the pivot point transformation. Otherwise, the local transformation of the child nodes will be changed.
Last update: 03.07.2017
Build: ()