InterpolateCameraPos

InterpolateCameraPos

Description:
Function InterpolateCameraPos move a player's camera from one position to another, within the set time. Useful for scripted cut scenes
Function InterpolateCameraPos was added in 0.3e and will not work in earlier versions!


Parameters:
(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT)
int playerid The ID of the player the camera should be moved for.
float FromX The X position the camera should start to move from.
float FromY The Y position the camera should start to move from.
float FromZ The Z position the camera should start to move from.
float ToX The X position the camera should move to.
float ToY The Y position the camera should move to.
float ToZ The Z position the camera should move to.
int time Time in milliseconds.
int cut The jumpcut to use. Defaults to CAMERA_CUT. Set to CAMERA_MOVE for a smooth movement.


Return Values:
This function does not return any specific values.


Examples:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/moveme", true))
    {
        TogglePlayerSpectating(playerid, 1);
        InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE);
        //Move the player's camera from point A to B in 10000 milliseconds (10 seconds).
        return 1;
    }
    return 0;
}


Related Functions
The following functions may be useful, as they are related to this function in one way or another.