I need to write some text on the screen, but my coordinates is a D3DVECTOR datatype. Is it either possible to write text directly in objectspace or do I need to convert objectspace to screen coordinates?
Tried the code similar to this but it just get messed-up coordinates:
VB Code:
Dim vp As D3DVIEWPORT8 Dim objCoord As D3DVECTOR Dim scrCoord As D3DVECTOR D3DDevice.GetViewport vp D3DDevice.GetTransform D3DTS_PROJECTION, matProj D3DDevice.GetTransform D3DTS_VIEW, matView D3DDevice.GetTransform D3DTS_WORLD, matWorld objCoord = myCoordinatesHere D3DXVec3Project scrCoord, objCoord, vp, matProj, matView, matWorld
Any suggestions?




Reply With Quote