PDA

View Full Version : InterpolateCameraPos


RedCounty
04/12/2013, 08:54 PM
I have the following code, but it's not working when I do /preview.


new Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ;

command(preview, playerid, params[])
{
TogglePlayerSpectating(playerid, true);
InterpolateCameraPos(playerid, StartX, StartY, StartZ, EndX, EndY, EndZ, 3);
return 1;
}

command(start, playerid, params[])
{
GetPlayerCameraPos(playerid, StartX, StartY, StartZ);
return 1;
}

command(stop, playerid, params[])
{
GetPlayerCameraPos(playerid, EndX, EndY, EndZ);
return 1;
}

I make sure I have /start and /stop done before I do anything, but it doesn't do anything.

Threshold
05/12/2013, 05:21 AM
InterpolateCameraPos(playerid, StartX, StartY, StartZ, EndX, EndY, EndZ, 3000, CAMERA_MOVE);

You need to make sure of the following:
- You are using /start and /stop before using /preview.
- /start and /stop are not in the same position.
- You are spawned before using /start and /stop.
- Nobody else has used either /start or /stop before you use /preview.