The variable Cam_Dist is used to determ the distance between the potential view which is the predefined view 'camera' in this code snippet and the entity (player). Camera.pan lets you rotate the view around a specific angle, more detailed:
Quote:
pan is the horizontal angle (0..360) about the upright Z axis
Next to pan, you have tilt and roll, those 3 can be described like this:
Quote:
The entities' Euler angles that describe rotations about the Z, Y, and X axis (in degrees, 0..360).
Here's a picture that shows it:
In overall, Cam_Dist is used for a sertain distance and pan is used for rotating
Yeah Im sorry I forgot to add the actual camera.pan and camera.tilt code in there... add this code below what I posted so that the camera always looks at the player.