Here you will learn how to position models within different coordinate systems.
If you have trouble getting the code in this tutorial to work, you can find the complete example script coordinateSystems in the \tutorials\3Dmodels directory.
When we positioned the models of the carousel, we did it in their parent's coordinate system. Sometimes we need to transform, aka change the position/orientation/scale, of a model in the world's coordinate system. What is the difference? Along with the whole virtual world, each model has a its own coordinate system, or imaginary x-y-z axes coming out of its center. If we did not spin the carousel, its coordinate system would have been aligned with the world's coordinate system. However as the carousel rotates its coordinate system rotates with it and its x-y-z axes have a constantly changing angle with respect to the world's x-y-z axes.
To further explore coordinate systems, lets create a family of pigeons.
Here is some basic world setup. For the environment we'll add the sky model. Next a grid and world axes are added in order to visualize Vizard's coordinate system. Navigation style is changed to Pivot Navigation so we easily pivot the viewpoint around the axes and objects that will later be added:
We now add a mama pigeon as a child of the world and set her position and orientation in world coordinates. Add the following code and run the script to see how she's placed and oriented in relation to the world axes:
Each object added to the scene will have it's own local coordinate system. To represent the pigeons's local system, another axes model is placed above her head. The origin of a model's local coordinate system is it's center point, as defined in the modeling software where it was created. Here, in order to see the axes model clearly, it's placed 0.4 meters above the pigeon's center point (and local origin), which is at the level of her feet:
Now, add the following code that animates the pigeon when the spacebar is pressed and run the script. This shows how her local coordinate system changes position and orientation with her movements: