So far, we've seen how to specify absolute positions for childPigeon in both parent and world coordinate systems. Let's continue with childPigeon and apply some relative transformations. Add the following code to place him back on the ground near his mother:
Now, move the camera a bit so we have a good view of both of them:
To move childPigeon relative to his own local coordinate system use the setPosition command with the viz.REL_LOCAL flag. Add and run the following code which moves him forward each time the 'l' key is pressed:
This has the effect of moving him 0.1 meters forward in the direction he's facing.
We can also move childPigeon relative to parent and world systems using the viz.REL_PARENT and viz.REL_WORLD flags, respectively. Add and run the following code:
When you press 'p' or 'w' childPigeon still moves 0.1 meters but in different directions. This is because he's moving along the Z axis of either mamaPigeon's or the world's coordinate system.