Code: Select all
actor Cam
{
Height 16
Radius 8
+NOGRAVITY +NOBLOCKMAP +NOCLIP
states
{
Spawn:
TNT1 A -1
stop
}
}
Code: Select all
Script "ArcCam" (int TID, int Time, int StartAngle)
{
int X, Y, Z;
int Angle = GetActorAngle(TID) + StartAngle;
int Pitch = 4096;
int Radius = 150;
int Height = GetActorProperty(TID, APROP_Height);
int AngleSpeed = 350;
int PitchSpeed = Pitch / Time;
int RadiusSpeed = 1;
for (int i = 0; i < Time; i++)
{
Angle += AngleSpeed;
Pitch -= PitchSpeed;
Radius += RadiusSpeed;
X = GetActorX(TID) - Radius * cos(Angle);
Y = GetActorY(TID) - Radius * sin(Angle);
Z = GetActorZ(TID) + Height / 2 + Radius * sin(Pitch);
SetActorPosition (3, X, Y, Z, false);
SetActorAngle (3, Angle);
SetActorPitch (3, Pitch);
delay (1);
}
}