Originally Posted by
visloom28vi
dis work on heroes and generals?
- - - Updated - - -
How would i make this work for heroes and generals ?
it does, look here: https://www.mpgh.net/forum/showthread.php?t=954443
Code:
..
//heroes and generals
D3DXMATRIX ProjMatrix, ViewMatrix, WorldMatrix;
D3DXVECTOR3 VectorMiddle(0, 0, 0), ScreenMiddle(0, aimheight, 0);
D3DVIEWPORT9 Viewport;
Device->GetViewport(&Viewport);
Device->GetVertexShaderConstantF(204, ProjMatrix, 4);
Device->GetVertexShaderConstantF(223, ViewMatrix, 4);
D3DXMatrixIdentity(&WorldMatrix);
D3DXMatrixTranspose(&ViewMatrix, &ViewMatrix);
D3DXMatrixTranspose(&ProjMatrix, &ProjMatrix);
D3DXVec3Project(&VectorMiddle, &ScreenMiddle, &Viewport, &ProjMatrix, &ViewMatrix, &WorldMatrix);
..