Set Player Face Point?
#1

I don't know how the fuck to do this.

I need a function that will set a player's facing angle to look at an X/Y position coords.

This isn't working:

pawn Код:
//Credits to Zeex
stock SetPlayerLookAt(playerid, Float:X, Float:Y)
{
    new
    Float:pX,
    Float:pY,
    Float:pZ;
    GetPlayerPos(playerid, pX, pY, pZ);
    return SetPlayerFacingAngle(playerid, -acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
}
Reply


Messages In This Thread
Set Player Face Point? - by Aerotactics - 25.11.2014, 01:17
Re : Set Player Face Point? - by MCZOFT - 25.11.2014, 01:30
Re: Re : Set Player Face Point? - by Aerotactics - 25.11.2014, 02:28
Re: Set Player Face Point? - by Write - 25.11.2014, 08:01

Forum Jump:


Users browsing this thread: 1 Guest(s)