I've tried with the magic numbers but can't get rid of clipping. It seems that when I play with the numbers I am faced with two options, have no clipping but have the camera move too fast and too close to the player when it approaches the wall. Have some clipping but have the camera move at a nice speed and stays at a nice distance from the player. It's keeping a balance. I've tried making the camera move out from a wall when it is next to it but it is hard to do with this sciprt and type of movement.

What do you mean by that I should try and eliminate clipping when the camera tilts? Do you mean that if the camera height changes during gameplay to stop the camera passing through a roof etc?

Here's the code I used to calculate the radius at which it needs to move to from the player, in case you ever plan to implement it

"cam_xyangle" is the camera's pan
"dist_total" is the maximum distance the camera can move from the player
"dist_traced" is a temporary variable used to calculate
"camera_move_to" is the radius at which the camera needs to move to from it's current distance from the player

The code will give you the variable "camera_move_to", which is the distance/radius the camera needs to be from the player in order to avoid collision.

[see first post above]

Last edited by AccessPhenomenon; 12/24/04 20:09.