[help] 3d to screen coordinates

Hexui Undetected CSGO Cheats PUBG Accounts

NTvalk

Hacker
Meme Tier VIP
Jul 6, 2013
499
3,108
8
Hey im trying to convert 3d to 2d(screen) coordinates, this is my code so far...
C++:
void worldtoScreen(D3DXVECTOR3 *inPut, D3DXVECTOR3 *outPut, LPDIRECT3DDEVICE9 Device)
{
	D3DXMATRIX matProj, matView, matWorld;
	D3DVIEWPORT9 viewport9;
	D3DTRANSFORMSTATETYPE worldTrans;

	Device->GetTransform(D3DTS_VIEW, &matView);
	Device->GetTransform(D3DTS_PROJECTION, &matProj);
	Device->GetTransform(D3DTS_WORLD, &matWorld);
	Device->GetViewport(&viewport9);


	D3DXVec3Project(outPut,inPut,&viewport9,&matProj,&matView,&matWorld);
}
Does anyone know what im doing wrong?
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
19,938
76
Sure the game uses SetTransform? If it doesn't, all your GetTransform functions are useless.

edit: you might want to output the matrixes you get with the functions and verify they are correct.
 
Community Mods