Skip to content

Commit 04aded0

Browse files
authored
Create Get_Player_Distance_To_Crosshair.cpp
1 parent b2c6585 commit 04aded0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// PositionHead is in screen position X and Y (calculated with word to screen)
2+
float GetPlayerDistanceToCrosshair(Vector2 PositionHead){
3+
return sqrt(pow((PositionHead.y + 10 - g_pOverlay->screen_centerY), 2) + pow((PositionHead.x - g_pOverlay->screen_centerX), 2));
4+
}

0 commit comments

Comments
 (0)