D3D9 crew – getting position of object rendered by DrawIndexedPrimitive?
What is the correct method of finding the location of an object rendered by DrawIndexedPrimitive?
I have tried using GetTransform and hooking SetTransform, but they always return a matrix of:
1000
0100
0010
0001
Here is an example of my SetTransform hook:
HRESULT APIENTRY hkIDirect3DDevice9::SetTransform(D3DTRANSFORMSTATE TYPE State, CONST D3DMATRIX *pMatrix)
{
if (State == D3DTS_WORLD){
m_pMatrix = pMatrix;
}
return m_pD3Ddev->SetTransform(State, pMatrix);
}
The value of m_pMatrix is then output when DrawIndexedPrimitive() is rendering a specific model rec, but the value of m_pMatrix is not the expected value.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.