ok now do this for us so we can help you.
first take all rotations from the tank, place some markers in the +x and + z and +y within your own 3d world, load your tank see what direction its pointing.
And yes its working in my code, my unit faces the target.(my world plane is x z, y up) if your worlds coord not match change the x,z, y params around(and thats enough guessing for me).
Rotating mesh till it look at another mesh
I am not sure what you mean, but I think my 3D world is working right, here is what happens:
Camera position:
m_vEyePt = D3DXVECTOR3(0.0f, 0.0f, 1.0f);
m_vLookAtPt = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
m_vUp = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
m_vRight = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
X, Y and Z:
Y+ move the mesh up towards the sky
Y- move the mesh down towards the ground
X+ move the mesh to the left
X- move the mesh to the right
Z+ move the mesh to back
Z- move the mesh to front
Of course if I moved the camera position the above will not be the same.
Camera position:
m_vEyePt = D3DXVECTOR3(0.0f, 0.0f, 1.0f);
m_vLookAtPt = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
m_vUp = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
m_vRight = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
X, Y and Z:
Y+ move the mesh up towards the sky
Y- move the mesh down towards the ground
X+ move the mesh to the left
X- move the mesh to the right
Z+ move the mesh to back
Z- move the mesh to front
Of course if I moved the camera position the above will not be the same.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement