Snippet to face a player to another player

Started by habi, Jul 19, 2020, 02:28 PM

Previous topic - Next topic

habi

Suppose you want player A to face to player B, you can use
FindPlayer(5).Angle=atan2(-(FindPlayer(0).Pos.x-FindPlayer(5).Pos.x),FindPlayer(0).Pos.y-FindPlayer(5).Pos.y)
Note: 1. Because we are measuring angle from North (y axis) instead of x axis
             2. The angle in vc-mp is measured counter-clockwise. It has been taken into account when i calculated the formula. (result in -ve sign in first parameter)

Sebastian

"Why iz everybody staring at me ?!"

or

"AIM [ON]"

KrOoB_


Mikimon

thats so nice, gonna build my lv 1 aimbot