SA-MP Forums Archive
AttachCameraToObject (camera angle) - 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: AttachCameraToObject (camera angle) (/showthread.php?tid=354476)



AttachCameraToObject (camera angle) - Audiophr3ak - 26.06.2012

Im trying to set different angles of the camera object, but the camera angle is still the same (45' i think). Is there any way to set custom camera angle while attaching it to a moving object? (The player state is SPECTATING)
pawn Код:
cam[playerid] = CreateObject(19300, 700.0000, -1302.0000, 100.0000, 0.0, 0.0, 90.0);
AttachCameraToObject(playerid, cam[playerid]);
MoveObject(cam[playerid], 1800.0000, -1302.0000, 100.0000, 10.0, 0.0, 0.0, 90.0);
FOUND THE SOLUTION with SetPlayerCameraLookAt, but im not sure its the most correct way. Any others?


Re: AttachCameraToObject (camera angle) - sirvasy - 27.03.2013

SetPlayerCameraPos
SetPlayerCameraLookAt
and you need a command for acction
GetPlayerCameraPos(playerid, x, y, z);