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?
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.
PlayerDataVec playerRet; // Declare our player vector here
//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 = *(float*)(0x797610);
fov = *(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);
you read 3 viewAngles. And like, if X is camera Yaw, and Y is the Pitch, then what is Z?