In this example world, passenger cars are moving on the skyride . By default, the camera remains in its original position as no instructions have been written to move the camera. Click the Start button to view the animation and the Stop button to end the animation.
Example World for "Stationary Camera"
View Stationary Camera program code
In other words, a camera.set point of view(target) instruction moves the camera to the target and has the camera face the same direction as the target is facing. After execution of a set point of view (definition) instruction, the camera will then portray the target object's point of view.
The following example is a modification of the skyride world, with the addition
of a set point of view
(definition) instruction.
In this version of the world, the camera moves to the first cable
car (skyride.Car1), which -- at the beginning of the animation -- is
still located in the lion's head on the right. Also, the camera's orientation is set to the same orientation as the first cable car. When the camera moves to the position of the first cable car, notice the camera does NOT move along with the car as it rides along the track. Click the Start button to view the animation and the Stop button to end the animation.
Example World for "Set Point of View"
View Set Point of View's Program Code
Note: After the camera's set point of view (definition) instruction is executed, one might expect that every time the target object moves, the camera would move along with and maintain the same orientation as the target. But, this is not true. That is to say, it does not repeatedly update. To have the camera move along with and maintain the same orientation as the target object requires additional coding (see the Set Vehicle instruction on this page).
The following example is yet another modification of the skyride world, demonstrating the effect of adding a set vehicle (definition) instruction. The new instruction is added to the previous version of the world, as shown in the set point of view instruction above. The camera now rides along with the cable car as it moves along the track. Thus, the view of the camera is from the perspective of riding the cable car! Click the Start button to view the animation and the Stop button to end the animation.
View Set Point of View and Set Vehicle's Program Code
Note: In this third version of the skyride world, both set point of view (definition) and set vehicle (definition) instructions were used. If the set vehicle instruction were invoked without the set point of view instruction being called, the camera would mimic the target object's movement, but would do so from wherever its CURRENT position is!
| Back | Return to Main |