SA-MP Forums Archive
camera problem - 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 problem (/showthread.php?tid=477261)



camera problem - caoraivoso3 - 23.11.2013

well i need to make a player look exacly at that spot from a camera already setted before.
how i do it?

example for the guys who dont understand my question:

i have camera x and i want camera x look at spot y.

mostly like this if someone knows and try to help thanks.


Re: camera problem - Voxel - 23.11.2013

use this (next time search samp wiki)
pawn Код:
SetPlayerCameraPos(playerid, x, y, z);
SetPlayerCameraLookAt(playerid, x, y, z);



Re: camera problem - DaRk_RaiN - 23.11.2013

Assuming you know how to use /save.
Go to the place you want the player to be LOOKING at,get the x y z and lets call the co-ords: LookAtx,LookAty, LookAtz.
Now, go to the place you want to the camera to be SETTED at (point of view) and get the x y z, and lets call them Isx, Isy, Isz, now the code will look like this:
pawn Код:
SetPlayerCameraPos(playerid, Isx, Isy, Isz);//His camera will be here.
SetPlayerCameraLookAt(playerid, LookAtx, LookAty,  LookAtz);//He will be looking this place.
Check the wiki page for further help.


Re: camera problem - caoraivoso3 - 23.11.2013

in setplayercameralookat you need to have a cameramovestyle and if you dont you are staring and the sky.
i am doing this in an interior.


Re: camera problem - caoraivoso3 - 23.11.2013

anyone?