Transform Example 6

Adding the Robot Head to a Body and Arms


The UPPER_BODY, consisting of the body and the arms, and the Robot Head are child nodes of a transform that encorporates them.
DEF and USE were used to alleviate some of the repetiveness of the code. A better coding strategy would be to use PROTO or EXTERNPROTO.


The movement of the head and mouth is done by using ROUTE commands together with an OrientationInterpolator and a PositionInterpolator, respectively.


The arms can be moved manually by dragging the mouse while holding down the right button (the mouse must be positioned over one of the arms). This is accomplished by using a SphereSensor. The body can also be rotated in the same fashion as above. This is accomplished by using a CylinderSensor.

VRML 2.0 world file
[ transformEx6.wrl ]

Code for Transform Example 6
[ Source ]

DEMO using Liquid Reality
[transformEx6_LR]