Solved Best way to draw 2d boxes?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
In fleeps videos, he uses a method in which he divides ~30000/distance to obtain boxHeight and boxWidth. This method works to an extent but has many flaws.

So in cs:go i use a method that requires the players bone matrix. I get the w2s position of both head and feet position, and subtract headPos - feetPos to get boxheight. Again not flawless.

So what is the best way to do this? I see a ton of esps that definitely do NOT use either of these methods as they do not have any of the side effects that these 2 methods produce. Thanks guys.
 

JewsusChrist

Newbie
Full Member
Feb 14, 2016
27
403
2
You can utilize some window functions - GetWindowRect() or GetClientRect() to get the screen dimension of your targeted game.

Once you have that, you then search for your mouse coordinates ingame (X and Y)

Then you calculate your screen dimensions and your mouse coordinate to function similar to a W2S variable in a game, you're set.

After all that, just calculate your 3D coord with other entities 3D coords and do your drawings and whatnot, make sure it's within the bounds of your windows dimension and should work just like a regular ESP.

This method is universal in all games, doesn't need you to find the W2S for your targeted game at all.

Downside is that some games mouse coordinates are encrypted or function in a weird way, so you're gonna have to do the algorithm to convert them pertaining to your game.

And your ESP doesn't look that bad, nubs would die for basic esp's...... buh we're all perfectionist here aren't we? ;)
 

Obsta

Jr.Hacker
Meme Tier VIP
Jan 27, 2014
394
2,978
17
So in cs:go i use a method that requires the players bone matrix. I get the w2s position of both head and feet position, and subtract headPos - feetPos to get boxheight. Again not flawless.
Whats flawed about it? Is the scaling on the width wrong?
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
Whats flawed about it? Is the scaling on the width wrong?
It's flawed in several ways. The biggest of which is when trying to draw entity's near corners of the screen.

box alligned normally.


slightly distorted


and more


and more.



I'm not looking for a debate on why this is or isn't a good method. I'm just asking if there are any other methods that may work better.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371
99% of ESPs are distorted on the edges/corner of the screen I wouldn't bother trying to fix it, if you want a more precise ESP: chams + wallhack tells you where the enemies are and will never be distorted
 

Obsta

Jr.Hacker
Meme Tier VIP
Jan 27, 2014
394
2,978
17
Rake;45345 said:
99% of ESPs are distorted on the edges/corner of the screen I wouldn't bother trying to fix it, if you want a more precise ESP: chams + wallhack tells you where the enemies are and will never be distorted
To add to this, if you're persistent on staying with external, you'll be better off drawing the bones for more accuracy.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,295
37,938
269
to get it as perfect as you could, you'd use the model's min & max bounds, theres code for it around the internet
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
You can utilize some window functions - GetWindowRect() or GetClientRect() to get the screen dimension of your targeted game.

Once you have that, you then search for your mouse coordinates ingame (X and Y)

Then you calculate your screen dimensions and your mouse coordinate to function similar to a W2S variable in a game, you're set.

After all that, just calculate your 3D coord with other entities 3D coords and do your drawings and whatnot, make sure it's within the bounds of your windows dimension and should work just like a regular ESP.

This method is universal in all games, doesn't need you to find the W2S for your targeted game at all.

Downside is that some games mouse coordinates are encrypted or function in a weird way, so you're gonna have to do the algorithm to convert them pertaining to your game.

And your ESP doesn't look that bad, nubs would die for basic esp's...... buh we're all perfectionist here aren't we? ;)
Do you know what this method is called? Or where i can find more info about it? Sounds like something i would really like to try.
 
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.

Similar threads

Community Mods