Building Interactive Worlds in 3D: Advanced Virtual Camera Development for The Diner Project — Part 2
This is the last in a series of excerpts from Building Interactive Worlds in 3D by Jean-Marc Gauthier.
Step 2: Cameras and Ways to Navigate Inside the Virtual World
1. Designing a new virtual camera called Dialogue camera. The Dialogue camera uses a stabilization system that is similar to the one described in Chapter 6. Once the camera is attached to a character, the stabilization system keeps the camera stable around its target. We can detach an orbital camera from a character the cameras center of rotation by increasing the distance between character and camera. At a given distance the camera moves out of the characters range. The camera breaks the Keep at Constant Distance behavior and becomes a free camera. The viewer can also choose to detach the camera from a character by pulling the camera away from the character. We chose to pull the camera away from a character because we thought that pushing a camera inside a character was a counterintuitive way to move a camera. We created a possibility for the camera to slide when getting close to the character.
The Dialogue camera is triggered by sound coming from the viewer or the space of the installation. Sound input, a great way to replace the keyboard and the mouse in interacting with a computer, is discussed in detail in Chapter 8. The volume of sound coming from the sound sensor, a microphone, is tested for values; above a given threshold, the Test building block triggers a message telling the camera to change its target. This is the starting point of a sequence of adjustments in space that will take the camera from one character to the other. The following diagrams illustrate the architecture of the behaviors created for the Dialogue camera.
The Dialogue camera behavior receives a message from the sound sensor and activates two strings of behaviors. The string on the top controls the translation and orientation components of the cameras motion in space. The string at the bottom picks up a new target, which is the other character.























Post new comment