function Camera_Action()
{
var mouseR_onhold = 0; //Not needed
var centerx = 0; // centre of circle (x)
var centery = 0; // centre of circle (y)
var centerz = 0; //Change these to point to your player
var radius = 400; // radius of circle
var thetaX = 0; // degrees done around the circle
var thetaZ = 0;
my = player = camera; //Important, he is using a my pointer, since for
//whatever reason your not making the camera
//an action, you need to get the my pointer point to the camera somehow
camera.genius = camera; //This you could probably get rid of, depends on what you want
while(1)
{
camera.pan = my.pan;
camera.tilt = clamp(camera.tilt,-70,70); //Change tilt to what you want or get rid of this
if(mouse_right) // right Mousebutton pressed?
{
mouseR_onhold = 1; //Not needed
mouse_map = NULL; //It would be nice if you checked if mouse_map wasn't NULL before-hand
thetaX+=mouse_force.x * 5; //I'd make a variable for 5 and tweak it to what
//you want the sensitivity to be, same with next one
thetaZ+=mouse_force.y * 5;
camera.x = centerx + (radius * sinv(thetaX));
camera.y = centery + (radius * cosv(thetaX));
camera.z = centerz + (radius * cosv(thetaZ)); //might be sinv() or tanv(), tweak till you like the result
vec_set(temp,centrex);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp); // now MY looks at YOU
vec_set(camera.x,my.x);
}
//Your previous function was round-about, I'd do this
if(mouse_map == NULL)
{
mouse_map = arrow;
}
wait(1);
}
}