
Originally Posted by
Merccy2
First create an application where you can draw on the screen without it fucking op csgo (so transparent and clickthrough).
Then get entity data lookup an tutorial.
Get the view matrix
Google WorldToscreen
Draw
bool WorldToScreen(Vector3D World, float *ScreenX, float *ScreenY)
{
//Get the enemy position
Vector3D Position = VectorSubtract(World, RefDef->Origin);
Vector3D Transform;
//Get the Dot Products from the View Angles of the player
Transform.x = DotProduct(Position, RefDef->viewAxis[1]);
Transform.y = DotProduct(Position, RefDef->viewAxis[2]);
Transform.z = DotProduct(Position, RefDef->viewAxis[0]);
//Make sure the enemy is in front of the player. If not, return.
if (Transform.z < 0.1f)
return false;
//Calculate the center of the screen
Vector2D Center = Vector2D((float)RefDef->Width * 0.5f, (float)RefDef->Height * 0.5f);
//Calculates the screen coordinates
*ScreenX = Center.x * (1 - (Transform.x / RefDef->fov.x / Transform.z));
*ScreenY = Center.y * (1 - (Transform.y / RefDef->fov.y / Transform.z));
return true;
}
Just took this off sum1's old post on mpgh lmao.
And is the ViewMatrix thingy on the offsets thread? I remember seeing the viewmatrix on it