Solved plz help worldtoscreen

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

sosp

Newbie
Mar 11, 2016
1
32
0
i'm make esp

i know my coordinates x,y,z
i know enemy coordinates x,y,z
i know my mouse X,Y

i dont know worldtoscreen fuction

sry i'm not good at english
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
i'm make esp

i know my coordinates x,y,z
i know enemy coordinates x,y,z
i know my mouse X,Y

i dont know worldtoscreen fuction

sry i'm not good at english
You will need to find the viewmatrix also here is a tutorial on how to find it:
 
Last edited:

metrix

0x90
Meme Tier VIP
Fleep Tier Donator
Trump Tier Donator
Oct 11, 2013
209
5,828
12
This is mine.

Note. It's for 1024*768 screen resolution. You should define a dynamic variable or just change it in the function.
Also there are several other/better ones in this forum via available.

C++:
bool WorldToScreen(Vec3D In, Vec3D& Out, float * ViewMatrix) {
	Out.x = In.x * ViewMatrix[0] + In.y * ViewMatrix[4] + In.z * ViewMatrix[8] + ViewMatrix[12];
	Out.y = In.x * ViewMatrix[1] + In.y * ViewMatrix[5] + In.z * ViewMatrix[9] + ViewMatrix[13];
	Out.z = In.x * ViewMatrix[2] + In.y * ViewMatrix[6] + In.z * ViewMatrix[10] + ViewMatrix[14];
	float w = In.x * ViewMatrix[3] + In.y * ViewMatrix[7] + In.z * ViewMatrix[11] + ViewMatrix[15];
	//

	if (w < 0.0)
		return false;


	Out.x /= w;
	Out.y /= w;
	Out.z /= w;

	Out.x *= 1024 / 2.0f;
	Out.x += 1024 / 2.0f;

	Out.y *= -768 / 2.0f;
	Out.y += 768 / 2.0f;

	return true;
}
 
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