SA-MP Forums Archive
Camera moving - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Camera moving (/showthread.php?tid=353965)



Camera moving - Crazyboobs - 25.06.2012

I have seen in many server (3e server) that the camera is moving from 1 place to another.
But i dont know how to script that.Can anyone tell me how to script like that? just the code so that it is easy for me to study.

Thanks.


Re: Camera moving - Dubya - 25.06.2012

https://sampwiki.blast.hk/wiki/InterpolateCameraPos
https://sampwiki.blast.hk/wiki/InterpolateCameraLookAt


Re: Camera moving - Grand_Micha - 25.06.2012

Something else:
pawn Код:
SetPlayerCameraLookAt(playerid,Float:x,Float:y,Float:z,1);
SetPlayerCameraPos(playerid,Float:x,Float:y,Float:z);



Re: Camera moving - Dubya - 25.06.2012

pawn Код:
InterpolateCameraPos(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT)
InterpolateCameraLookAt(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT)
Example:
pawn Код:
InterpolateCameraPos(playerid, 1668.9432,-1458.1198,120.6119, 1506.6499,-1675.8396,41.2007, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1586.5640,-1281.9943,120.6119, 1554.6344,-1675.5366,16.1953, 3000, CAMERA_MOVE);