Game Development Reference
In-Depth Information
Then the up vector of the camera can be computed by crossing the target
up with the camera forward to get camera left, and then crossing camera
forward with camera left to get the camera up.
3 . A spring follow camera has both an ideal and actual camera position. The
ideal position updates every frame based on the rigid basic follow camera,
while the actual camera position lags behind a little bit. This creates a
much more fluid camera experience than the rigidity of the basic follow
camera.
4 . The camera's position in an orbit camera should be stored as an offset
from the target object, because it allows the rotations to more easily be ap-
plied.
5 . The target position is stored as an offset from the camera, and as the char-
acter rotates and looks around, the target position must be rotated as well.
6 . A Catmull-Rom spline is a type of spline curve that can be defined by a
minimum of four control points: one before and one after the two points
that are being interpolated between.
7 . A spline camera can be very useful for cutscenes where the camera needs
to follow a set path.
8 . If a follow camera is being blocked by objects, one solution is to perform
a ray cast from the target to the camera and then place the camera position
at the first point of collision. Another solution is to reduce the alpha of ob-
jects that are between the camera and the target.
9 . In an unprojection, a z-component of 0 corresponds to the 2D point on the
near plane, whereas a value of 1 corresponds to the same point on the far
plane.
10 . Picking can be implemented by unprojecting the 2D point onto both the
near plane and the far plane. Then, a ray cast between the two points can
be performed to determine which object is intersected with.
Chapter 9: Artificial Intelligence
1 . Node 0: {1, 4}; Node 1: {0, 2, 4}; Node 2: {1, 3}; Node 3: {2, 4}; Node
4: {0, 1}.
2 . A typical area requires fewer nodes when represented by a navigation
mesh as opposed to path nodes. At the same time, you can get more cov-
erage of the area with a navigation mesh.
Search WWH ::




Custom Search