SA-MP Forums Archive
GetPlayerCameraAngle - 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: GetPlayerCameraAngle (/showthread.php?tid=385710)



GetPlayerCameraAngle - Timmeyable - 17.10.2012

Hi guys,

i need a funktion to get the camera angle. I dont know how i should
do that
The funktion should be like GetPlayerFacingAngle but with the players
camera angle.

Anybody a idea?

Tim


Re: GetPlayerCameraAngle - TzAkS. - 17.10.2012

https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle ?


Re: GetPlayerCameraAngle - Mauzen - 17.10.2012

You can get both, horizontal and vertical angle with GetPlayerCameraFrontVector and hori=atan2(vx, vy), vert=asin(vz)


Re: GetPlayerCameraAngle - Timmeyable - 17.10.2012

@TzAkS.:

I dont want the PlayersFacingAngle.

I am searching for a funktion that gets the CameraAngle.

Example:

pawn Код:
new Float:Cangle, string[100];
GetPlayerCameraAngle(playerid,Cangle);
format(string, sizeof(string), "Your camera look in this direction: %f",Cangle);
SendClientMes......
@Mauzen:

Wie ich sehe bist du deutsch
Kannst du mir das genauer erklдren?


Re: GetPlayerCameraAngle - Timmeyable - 18.10.2012

Can some say me how to use GetPlayerCameraFrontVector?

I want to set the velocity of a car in this direction where the player is looking
with his camera. Not the Facing or VehicleZAngle.

pawn Код:
new Float:vX, Float:vY, Float:vZ, Float:vA;
new myCar = GetPlayerVehicleID(playerid);
GetVehicleZAngle(myCar, vA);//Here i need the camera rotation
GetVehicleVelocity(myCar,vX,vY, vZ);
SetVehicleVelocity(myCar, vX+=4 * floatsin(-vA, degrees), vY+=4 * floatcos(-vA, degrees), vZ);



AW: GetPlayerCameraAngle - Timmeyable - 22.10.2012

No idea ?


Re: GetPlayerCameraAngle - JaKe Elite - 22.10.2012

You ignore Mauzen's suggestion.


Re: AW: GetPlayerCameraAngle - Mafioso97 - 22.10.2012

Quote:
Originally Posted by Timmeyable
Посмотреть сообщение
No idea ?
Your question has already been answered my friend; read closely, if still unsure > ****** it.


Re: AW: GetPlayerCameraAngle - rt-2 - 06.05.2017

Quote:
Originally Posted by Mafioso97
Посмотреть сообщение
if still unsure > ****** it.
I ******d it, this is the best result,,,
Where's your god now?