Rotator rotates a target object on the X, Y or Z axis in degrees.
The node can rotate an object for a certain amount, set its angle to a defined rotation, or it can offset the object from its current angle for a certain amount. Duration defines how long the rotation takes.
Target | Set the target object |
Execute ↳ On Start |
Toggled on the node will execute as soon as the game starts |
Enabled | Enable or disable the node. Disabled nodes cannot be executed |
Affect Physical | If disabled, the rotator will only rotate the visual properties of the object |
Loop | Repeat the rotation automatically as soon as it is completed |
Allow Override | When toggled on the rotation can be interrupted before completing. This can happen if the node is disabled or a new rotation is executed. |
Shortest Path | When toggled on, the node will rotate an object over the shortest distance between the start and end points * example case below |
Teleport | The teleport toggle can improve the interpolation between start and end point when making a large rotation over a short time |
Operation | Set the operation of the rotator,: Rotate, Set Rotation, or Set Rotation Offset - jump to Operation Types |
Space | Set the space: Local, Parent or Global - jump to Space Types |
Vector | This input can receive a vector from another node. The input will be used as the rotation value. |
↳ X, Y & Z | Set the X, Y & Z values manually or with other logic nodes to define the rotation |
Duration | Set the duration for the rotation |
Tween | Set how the rotation should interpolate between start and end points. When the Tween setting is Linear, the rotation proceeds evenly. Test different settings for example to create a smooth start or end. |
On Loop/End | Send a signal to other nodes or objects when the rotation is complete |
The goal is to rotate an object 270 degrees on the Y axis over 1 second.
With shortest path off the object will rotate 270 degrees over 1 second but with Shortest Path toggled on the object will only rotate -90 degrees because the end point of 270 degrees is only -90 degrees away from the start point of zero.
Rotate | Rotate the object from the starting rotation to the final rotation over the duration. If the node is executed again with the same values the rotation will happen again with the last end rotation now the starting rotation. |
Set Rotation | Rotate the object from the starting rotation to a new rotation over the duration. If the Node is executed again with the same values nothing will happen as the object has already been rotated to the set rotation. |
Set Rotation Offset | With Set Rotation Offset the node will "displace" the object from its current rotation for a certain amount. The amount of the offset is based on the X, Y & Z values. If the node is executed again with the same values an offset will not happen as the object has already been placed to the set rotation. Good e.g when used in conjunction with the Wave. |
Local | Rotations will align with the rotation of the target object |
Parent | Rotations will align with the rotation of the target object's parent (only if the object is glued to another object) |
Global | Rotations will align with global X, Y & Z coordinates |
Here's a link to an example that shows how to use the Rotator node: