var cam;
var camera_distance = 200; //Use this to set the distance between camera and player.

function drakun_camera()
{
my.pan -= 4 * mouse_force.x * time_step;
camera.pan = my.pan;
camera.tilt += mouse_force.y * 6 * time_step;
camera.tilt = clamp(camera.tilt,-60,60);
cam = fcos(camera.tilt,- camera_distance);
vec_set(camera.x,vector(my.x + fcos(camera.pan,cam),my.y + fsin(camera.pan,cam),my.z + 20 + fsin(camera.tilt,- camera_distance)));
}

Here you go for free... If needed any change just tell and i'll try to help laugh
Goodluck

Oh this is simple but effective :), Good luck about the gravity anomaly x)

Last edited by Mythran; 09/28/11 18:18.