I have a function that rotates the camera 360 degrees arround my character, but i want to control de rotation speed and i cannot understand very well how to include and speed variable or how to modify it, this script is from long time ago but it works very well.
Can someone help me how can i slow the rotation speed?
Thx!
Code:
function r360
{
var radio = 500; //circle
var SC = 1.0; //When increased, circle becomes elliptic
var cx = 0; //Coordenada X - Centro del circulo (la camara rota en torno al centro)
var cy = 0; //Coordenada Y - Centro del circulo (la camara rota en torno al centro)
var T = 0; //Rotation width
var xx;
var yy;
var partypan = 180;
while(state==field1)
{
while (T < 360)
{
T += 1;
partypan -= 1;
xx = (SC * (cos(T) * radio)) + cx;
yy = cy - (sin(T) * radio);
cam_lejana.x = xx;
cam_lejana.y = yy;
if(partypan==0) {partypan=360;}
cam_lejana.pan = partypan;
wait(1);
}
T = 0;
partypan = 180;
}
}