Transform Path
Transform Path is a succession of transformations based on an arbitrary path. The objects that are made children of the Transform Path can move along with these transformations.Transform Path是基于任意路径的一系列转换。成为Transform Path子级的对象可以随这些转换一起移动。
See also也可以看看#
- The WorldTransformPath class to manage Transform Path via API通过API管理Transform Path的WorldTransformPath类
Adding Transform Path添加变换路径#
To add Transform Path to the scene via UnigineEditor, do the following:要通过UnigineEditor将Transform Path添加到场景中,请执行以下操作:
- Run the project with UnigineEditor.跑步UnigineEditor的项目。
-
On the Menu bar, click Create -> Transform Path.在菜单栏上,单击Create -> Transform Path。
-
Choose the path to the *.path file.选择*.path文件的路径。
The path can be changed afterwards in the World Transform Path section of the Parameters window.此后可以在Parameters窗口的World Transform Path部分中更改路径。 - Place the object somewhere in the world.将物体放置在世界上的某个地方。
Adding Objects Moving along the Path添加沿路径移动的对象#
To make objects move along the path, do the following:要使对象沿路径移动,请执行以下操作:
- Make the object a child of the path.使对象成为孩子的路径。
-
Set the same initial positions for the object and the path.为对象和路径设置相同的初始位置。
If the object coordinates differ from the path coordinates, the object will have the corresponding offset relative to the path.如果对象坐标与路径坐标不同,则对象将具有相对于路径的相应偏移。 - To put the object in motion, click Play on the Node tab.要使对象运动,请在Node选项卡上单击Play。
- Adjust the playback parameters.调整播放参数。
Parameters参数#
In the Node tab of the Parameters window, you can adjust the following parameters of Transform Path:在Parameters窗口的Node选项卡中,可以调整Transform Path的以下参数:
Path | Sets a path to the new *.path file.设置新*.path文件的路径。 |
---|---|
Orientation | Indicates whether the object should be oriented along the path or keep its initial position.指示对象应沿路径定向还是保持其初始位置。 |
Playback Parameters播放参数#
Transform Path has the following playback parameters:Transform Path具有以下播放参数: