• Thread: World to screen coordinates?

1. World to screen coordinates?

Hi

I am trying to create an external esp hack for assault cube.
The problem I have is that I cant figure out how to convert world to screen coordinates. I know there is a function called D3DXVec3Project but this function requires a projection, view and world matrix and I dont have any of these (I just have the matrices from the device of my layered window where I do drawing action and I dont think that they are the right ones for this function).
The things I got are the X, Y and Z coordinates of an enemy and the X, Y viewangle of the player and of course the dimensions of the window. Are these information enough to convert the coordinates or do I need to get more information?

2. Hey there acss, W2S can be tricky business specially if your not great at Maths(such as myself) I'm pretty sure I used a function for that in my COD4 hacks for ESP and aimbot. Please go to this thread and check it out. https://guidedhacking.com/showthread...napLine-AIMBOT

It should have what you need but you will probably need to change certain vars etc, but the code is fairly well commented so you should be alright with that.

Fleep

I will take a look on the code

4. Yo Fleep, I have one question.

In this function

```PlayerDataVec GetPlayerVec()
{
PlayerDataVec playerRet; // Declare our player vector here

playerRet.health =*(int*)(0x12886A0);
playerRet.isInGame =*(int*)(0x74E35C);
//Get our client number
playerRet.clientNum = *(int*)(0x74E338);
playerRet.team = *(int*)(0x83928C); //GET OUR current team so we don't shoot at team mates
//GET OUR FIELD OF VIEW
fov[0] = *(float*)(0x797610);
fov[1] = *(float*)(0x797614);

viewAngles.x = *(float*)(0x79B698);
viewAngles.y = *(float*)(0x79B69C);
viewAngles.z = *(float*)(0x79B6A0);
//playerRet.xPos = *(float*)(0x797618); // these can also be used
//playerRet.yPos = *(float*)(0x79761C); // but they're later down in CE list
//playerRet.zPos = *(float*)(0x797620); // so the top-most are used below
playerRet.xPos = *(float*)(0x72AF2C);
playerRet.zPos = *(float*)(0x72AF30);
playerRet.yPos = *(float*)(0x72AF34);
playerRet.clientNum = *(float*)(0x74E338);

return playerRet;
}```

you read 3 viewAngles. And like, if X is camera Yaw, and Y is the Pitch, then what is Z?

5. Z is roll. For example, leaning left and right. Not always used.

6. Ah, thanks man. So if I dont use it I should just put it to 0 or?

7. Originally Posted by leetal99
Ah, thanks man. So if I dont use it I should just put it to 0 or?
Up to you man