SA-MP Forums Archive
Little Help With Players 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: Little Help With Players Camera (/showthread.php?tid=297636)



Little Help With Players Camera - Dragony92 - 16.11.2011

How can i move players camera to look at some other player.


Re: Little Help With Players Camera - [MG]Dimi - 16.11.2011

https://sampwiki.blast.hk/wiki/TogglePlayerSpectating
https://sampwiki.blast.hk/wiki/PlayerSpectatePlayer


Re: Little Help With Players Camera - Dragony92 - 16.11.2011

I'm not looking for spectate function,...
I just want to rotate player to look at some other player, to rotate his camera...

p.s. Pozdrav Srbine


Re: Little Help With Players Camera - SVRP - 16.11.2011

nvm - too late


Re: Little Help With Players Camera - KosmasRego - 16.11.2011

Use the savedpositions with /save


Re: Little Help With Players Camera - grand.Theft.Otto - 17.11.2011

Not too sure, it is complicated ...

But try getting the playerid and targetid's positions, if the playerid is in range of the targetid, use SetPlayerCameraLookAt(playerid,targetidX,targetidY ,targetid,Z);


Re: Little Help With Players Camera - Dragony92 - 17.11.2011

@grand.Theft.Otto i'll try that. Edit: Don't work, as i thought..
Any other solution? I need that for snowball throwing, to move players facing angle to look at person on which he is throwing snowball...


Re: Little Help With Players Camera - Dragony92 - 26.11.2011

BUMP! Anyone?


Re: Little Help With Players Camera - Rob_Maate - 26.11.2011

You need to SetPlayerCameraPos AND SetPlayerCameraLookAt.

Imagine X = the player you want to look at and x is your camera, ---- = line of sight


Код:
x----------------X
x,y,z           x,y,z
You need to specify both those points.
My question is this, what exactly is the purpose of your code?
Like what are you trying to achieve by having the camera aimed at another player.
That will determine what steps are required to produce the result you want


Re: Little Help With Players Camera - Dragony92 - 26.11.2011

For snowball throwing, when player throw snowball on other player to look at him...