ConstantRotation
Inherits Rotation
Makes a scene graph node rotate about the provided axis at a fixed and constant rotation speed.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The type of the rotation that is described in this element. The available types of rotations depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation. |
|
Must name a valid Rotation type |
No |
|
This value is the rotation axis around which the object will rotate. |
|
In range: ( {-1,-1,-1}, {1,1,1}) |
Yes |
|
This value determines the number of revolutions per in-game second. |
|
Value of type ‘Double’ |
Yes |
|
The time frame in which this |
|
Yes |
Inherited members from Rotation
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The type of the rotation that is described in this element. The available types of rotations depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation. |
|
Must name a valid Rotation type |
No |
|
The time frame in which this |
|
Yes |
Asset Examples
Basic
This asset applies a rotation to a set of coordinate axes that makes them rotate at a constant rate of one revolution around the z-axis every 2 seconds.
1local Node = {
2 Identifier = "ConstantRotation_Example",
3 Transform = {
4 Rotation = {
5 Type = "ConstantRotation",
6 RotationAxis = { 0.0, 0.0, 1.0 },
7 RotationRate = 0.5
8 }
9 },
10 Renderable = {
11 Type = "RenderableCartesianAxes"
12 },
13 GUI = {
14 Name = "ConstantRotation - Basic",
15 Path = "/Examples"
16 }
17}
18
19
20asset.onInitialize(function()
21 openspace.addSceneGraphNode(Node)
22end)
23
24asset.onDeinitialize(function()
25 openspace.removeSceneGraphNode(Node)
26end)