SA-MP Forums Archive
Camera above the player - 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 above the player (/showthread.php?tid=427511)



Camera above the player - Pawnie - 02.04.2013

Ay guys, well I started making something, and I could use your help, anyone got any idea on how to set players camera above him, and looking down at him? So far I made this:

Код:
new object = CreateObject(19300, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 200.0);
    
    AttachObjectToPlayer(object, playerid, 0, 0, 10, 0.0, 1.5, 2);
    AttachCameraToObject(playerid, object);
I've attached the object and seted the object heigh so the player can look down, anyone got any idea on how to prevent him from moving it? Or for example how to make the camera just to look down at the player.


Re: Camera above the player - Pawnie - 02.04.2013

Resolved.


If anyone needs

Код:
new Float:X;
	new Float:Y;
	new Float:Z;
	GetPlayerPos(playerid,X,Y,Z);
	SetPlayerCameraPos(playerid,X,Y,Z+12);
	SetPlayerCameraLookAt(playerid,X,Y,Z);