• Advertisement
Sign in to follow this  

[c++ direct3D 9] two .X Mesh transform problem

This topic is 3136 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there. I'm having some issues trying to move only 1 mesh... i know that if you want to "move" a mesh in your program, you should move the whole world using something like D3DXMatrixRotationY(&matEarth, angle); pd3dDevice->MultiplyTransform(D3DTS_WORLD, &matEarth); but in my case i have 2 meshs, one for earth and another one for the sun... and i want to know how could i put the sun in the middle of the screen locked on, and the Earth spinning around it... i already programmed the spin and so.. but the sun moves with the earth together.... uu' cuz what i'm moving is the world.. is there anyway to create one different world for each mesh? or anything that i could do to treat just the movement of one single mesh? ty in advance. leandro.

Share this post


Link to post
Share on other sites
Advertisement
A world matrix is the position/scale/rotation/etc.. of an object inside the world, each object should have a unique world matrix. (If you are using the fixed pipeline, you have to modify the world matrix before each object is drawn)

In your case the world matrix of the sun should be static while the world matrix of the earth should change each frame.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement