Solved CSGO ESP Box height not scaling properly at different distances

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat


Full Member
Aug 24, 2020
Tutorial Link
How long you been coding/hacking?
4 years coding / 3 months hacking
Coding Language
Hello all, I have recently been working on my own CSGO external box esp and I've managed to get everything working so far.
The only issue is the height of the box that I'm using doesn't scale properly. Currently, this is what happens from far away:
Screenshot 2020-09-17 132038.jpg

and this is what happens from point-blank:
Screenshot 2020-09-17 131955.jpg

Here's a better overall picture:
Screenshot 2020-09-17 133618.jpg

Currently, I'm drawing boxes by iterating through the entity list and reading the m_vecOrigin for the base of the player and the head bone via m_dwBoneMatrix. More specifically, here's the code:
read(handle, LPC(entityBase + m_vecOrigin), &curr.pos, sizeof(curr.pos), 0); // regular xyz
read(handle, LPC(entityBase + m_dwBoneMatrix), &boneMatrix, sizeof(boneMatrix), 0);
read(handle, LPC(boneMatrix + 0x30 * 8 + 0x0C), &curr.head.x, sizeof(float), 0);
read(handle, LPC(boneMatrix + 0x30 * 8 + 0x1C), &curr.head.y, sizeof(float), 0);
read(handle, LPC(boneMatrix + 0x30 * 8 + 0x2C), &curr.head.z, sizeof(float), 0);
My struct for curr.pos is just 3 floats (x,y,z) if you're confused.

Then, here's my world to screen function that I'm using to convert it:
struct espBox {
    float x, y, w, h;

espBox r;

// do world to screen calc here with view matrix

r.x = centerX; // done calculation - don't worry about the x and y they're correct
r.y = centerY; // specifically, the x and y represent the head pos of the player

r.h = curr.head.z - curr.pos.z; // get the head pos - vec origin pos to get height
r.w = r.h / 2.f; // width is a ratio of the height

// in another function for drawing everything...
for (espBox r : players){
     d3dfunctions.drawBox(r.x-(r.w/2), r.y, r.w, r.h);
I would assume that the issue with the boxes have the do with the fact that I'm not transforming the height with the view matrix but I'm not sure how to do it. I've looked online but more specifically, I followed this tutorial and at 4:40, it explains all the formulas needed for the world to screen function. I have a hunch that the thing I would need is z prime but I'm not sure. Any help would be appreciated.

My second issue is described by this forum post. I'm having the exact same issue where the box keeps on getting smaller and smaller when zooming in with the awp scope. Here are some pictures for reference.

Screenshot 2020-09-17 164011.jpg

Screenshot 2020-09-17 163942.jpg

Screenshot 2020-09-17 163959.jpg

I've already looked at the unknown cheats post and I'm not very sure I understand what one of the answers meant. It said to not calculate the height via distance but instead use w2s on head-pos and foot-pos but I'm not using distance in any of my calculations. Anyways, any help or pointers in the right direction is appreciated. Thanks.
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods