Help! Line on X axis is correct but not on Y axis (ESP)

jkof

Platinian
Original poster
Mar 28, 2020
36
5
8
24
France
Hello,
Im trying to make an ESP on iOS, but im facing the issue that the Y axis is not drawing good...

I have check this, and tried the suggestion but it didn't work Link To Topic

Here is the code (Only useful stuff, i have deleted all the rest):

C++:
Vector3 PlayerPos = GetPlayerLocation(Player);
void* Cam = GetCamera();
Vector3 PlayerPos_w2s = WorldToScreenPoint(Cam, PlayerPos);

                if (PlayerPos_w2s.z < 0f) continue;
                //player_t contains a Vec2 that holds the position of the position of the Box (and line should draw on there)
                player_t* currPlayer = new player_t();
                //the X axis is working, not the second parameter (Y axis)
                currPlayer->bottomofbox = CGPointMake(PlayerPos_w2s.x - Screen.frame.size.width/2, Screen.frame.size.height -  PlayerPos_w2s.y );
                P->push_back(currPlayer);
       
                if ([switches isSwitchOn : @"ESP Lines"]) {
                    es.esplines = true; 
         }
i guess here is the problem :
C++:
Screen.frame.size.height -  PlayerPos_w2s.y
, but i dont see what to do

Here is an image example showing the problem :
photo_2022-07-26_17-56-07.jpg


Thanks for any advice :)
 

GHr__><__

Solid & Active Platinian
May 22, 2020
71
3,434
1,193
Indonesia
Try

C++:
auto PlayerPos_w2s = WorldToScreenPoint(GetCamera(), GetPlayerLocation(Player));

if (PlayerPos_w2s.z > 0) {
    player_t* currPlayer = new player_t();
    currPlayer->bottomofbox = CGPointMake(PlayerPos_w2s.x, Screen.frame.size.height -  PlayerPos_w2s.y);
    P->push_back(currPlayer);
    if ([switches isSwitchOn : @"ESP Lines"]) {
        es.esplines = true;
    }
}
 
Last edited:
  • Like
Reactions: Prabu2222222

jkof

Platinian
Original poster
Mar 28, 2020
36
5
8
24
France
Mhhh... im still facing that issue... the X axis doesn't work too.
If i do :
Position.z > 0, it draw behind the players 🤔