Jump to content

  • Log In with Google      Sign In   
  • Create Account


Rotating mesh till it look at another mesh


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
21 replies to this topic

#21 ankhd   Members   -  Reputation: 1185

Like
0Likes
Like

Posted 15 May 2012 - 09:21 PM

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).

Sponsor:

#22 Medo3337   Members   -  Reputation: 665

Like
0Likes
Like

Posted 17 May 2012 - 11:03 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS