SA-MP Forums Archive
satplayer facing camera? - 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: satplayer facing camera? (/showthread.php?tid=438682)



satplayer facing camera? - NicholasA - 21.05.2013

How can I make my player face the camera?


Re: satplayer facing camera? - Littlehelper - 21.05.2013

Don't make your player face the camera, make camera face your player.
Now look.
The SetPlayerPos you use on OnPlayerRequestSpawn callback must be used in SetPlayerCameraLookAt.
EXAMPLE:
pawn Код:
SetPlayerPos(playerid, 1533.2617,2773.1384,10.6719); // player pos
    SetPlayerCameraPos(playerid, 1537.8656,2773.3386,10.8056); // camera pos
    SetPlayerCameraLookAt(playerid, 1533.2617,2773.1384,10.6719); // this will make the camera look at where PlayerPos is
This way the camera will look where the PLAYER is.