Local and World Space
This article discusses the difference between the position of an object on the Flowcode panel and how that position appears on screen.
A component position
The position of any object drawn on the panel is defined by three parts:
- A set of coordinates, (X, Y, Z), which define the centre of the object.
- An axis represented by the angles pitch, yaw, roll. These are called Euler angles.
- A scale to multiply the size of all child objects by.
This defines the local position of an object. That is, the position of the object without consideration of any other object on the panel.
All other representations of the objects position can be derived from this local position.
Bounding box
The bounding box of the object is exactly the same as its position, except that instead of a scale a size is used instead. This is the scale of the object multiplied by the size of all the child objects.
The size of a leaf object is equal to its scale, as the object has no children to multiply its scale by. Hence the bounding box of a leaf object is the same as its local position.