22.12.2018, 17:59
I have made a cinematic camera, but when I run the script it immediately jumps into the last cinematic code ... how do I make the code run gradually?
PHP код:
CinematicCam(playerid)
{
SetPlayerCameraPos(playerid,1276.006469,-936.524597,90.039863);
SetPlayerCameraLookAt(playerid,1246.505981,-844.114501,81.519821);
InterpolateCameraPos(playerid,1276.006469,-936.524597,90.039863,1389.417602,-931.154968,82.439796,10000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid,1246.505981,-844.114501,81.519821,1426.016967,-844.654479,102.139877,10000,CAMERA_MOVE);
//=================================================================
SetPlayerCameraPos(playerid,1483.950439,-940.354980,261.869598);
SetPlayerCameraLookAt(playerid,1421.649658,-993.505432,189.409561);
InterpolateCameraPos(playerid,1483.950439,-940.354980,261.869598,1492.840576,-1644.854858,47.399536,34000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid,1421.649658,-993.505432,189.409561,1547.959716,-1675.065673,19.279478,32000,CAMERA_MOVE);
//=================================================================
SetPlayerCameraPos(playerid,369.816406,-1802.654541,7.591873); // this code is executed directly and passes the previous code !! :(
SetPlayerCameraLookAt(playerid,369.816589,-1803.047241,6.231879);
InterpolateCameraPos(playerid,369.816406,-1802.654541,7.591873,369.926391,-2010.772827,14.871878,34000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid,369.816589,-1803.047241,6.231879,369.836364,-2073.043701,21.061885,32000,CAMERA_MOVE);
//=================================================================
}