[help] 3d to screen coordinates

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

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
12,638
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.
 
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