Make a player face another player
#4

He's using player1 pos and player2 pos to calculate arc tangent (atan), which gives the angle of the tangent (player2posy-player1posy)/(player2posx-player1posx), exactly what you asked for. Z coordinate isn't actually needed, but still you have to use it as GetPlayerPos requires 3 arguments. I wouldn't use floatabs to calculate the angle, though.

Also, this function sets angle for vehicles.
Reply


Messages In This Thread
Make a player face another player - by Extremo - 11.06.2012, 04:59
Re: Make a player face another player - by MP2 - 11.06.2012, 05:03
AW: Make a player face another player - by Extremo - 11.06.2012, 05:14
Re: Make a player face another player - by waxhunter - 11.06.2012, 17:15

Forum Jump:


Users browsing this thread: 1 Guest(s)