Game Development Reference
In-Depth Information
How it works...
This is an easy way to handle leaning since we have very few calculations to do. The scene
graph takes care of that for us. This works for the same reason; the turning of the
head
node in the
Creating a reusable character control
recipe could control the camera, which is
normally not available in the scene graph. By attaching the
head
node to the center point
(which, in turn, is attached to the main player node), any rotation or movement that the
node does will be propagated to the
head
node, and thus, the camera.