Every object in your Synthetic Environment has an X, Y and Z axis around which it can be rotated. The position of the axis defaults to the centre of the object or group but often, as in the case of our camera lens and mode dial, we want and object or group to rotate around a different centre.
The best analogy is a human joint. For example, the forearm bends (or rotates around) the elbow joint. In the case of a Synthetic Environment the centre of rotation for the forearm would have to be moved to the upper end of the limb.
back to top | return to Assemble Scene
Download and unzip the following file (using WinZip) into the relevant folder of your working directory.
models_grouped..zip (49.9Kb)
This file contains:
- camera_named.wrl
- battery_textured.wrl
- memstick_textured.wrl
back to top | return to Assemble Scene
![]() |
|
|
Ensure you are in Selection Priority Lowest
Select one of the objects in the modeDial group then Select
Parent |
![]() |
| The selecton should look like this in the Outline Editor: | ![]() |
|
Holding down both the
|
![]() |
|
Switch to the Front View.
Select one of the objects in the lens group then
Select Parent Turn on the Grid Rotate the lens 90° clockwise. |
![]() |
| Create a Parent Group
Holding down both the |
![]() |
|
Switch back to the Front View.
Create another Parent Group |
![]() |
|
Note: The reason for doing all this will become clearer when we tackle complex interactions but essentially we need to use a cylinder drag sensor to allow the user to rotate the lens. Cylinder sensors operate on the Y (up-down) axis only thus we have to set up this nesting of rotated groups so that we have a local Y axis that is actually running left-right through the centre of the lens. Trust me, it'll make more sense later ;-) |
|
|
Have a go yourself at changing the axes of rotation for the battery cover and the memory stick cover. When it comes to animating them they need to "swing" on their imaginary hinges. Refer to the Finished Project to see where the hinges are located. |
|