This article refers to the representation of an object drawn on either the System panel or the Dashboard panel.
Flowcodes representation of rotation
An object is rotated around an axis. An axis is the direction an object is facing.
If you imagine any object as a cube in shape, then aligning your view with the objects top or bottom faces is looking at the object in the Z axis, front and back is along the Y axis, and left and right sides are the X axis.
As convention, Flowcode represents the X axis in red, Y in green and Z in blue.
Using the properties
Using the API
Specifying any pivot other than the center of the rotating object will alter the objects coordinates as well as its angle.
When specifying a pivot other than the objects center, imagine a solid bar, attached at one end to a fixed pivot point, and the other to the centre of the rotating object. The rotation has the effect of rotating that bar, and therefore the object attached to the other end, around an axis.
Each rotation call can specify that pivot to rotate around, and some of the more powerful calls can also specify an axis to rotate in.
Local and world space
- Main article: Local and world space
When working with objects in the flowchart, local rotation is always preferred over world space. This is so that rotating an objects parent does not affect the 'coordinate space' of the program - rotating to 90degrees in X will always move your object predictably in relation to other objects in the component, despite the users rotation of the component itself, which is out of the component authors control.
It is very difficult to program an object to behave as expected in all circumstances using the world position.
To calculate the world rotation from an objects local rotation, this must be combined with the rotations of all the objects parents in the Component tree.