D3DRM Rotate

Started by
0 comments, last by Gandalf 23 years, 10 months ago
What means D3DRMCOMBINE_REPLACE in: m_pCube->AddRotation(D3DRMCOMBINE_BEFORE, 0,1,0,g_DEGTORAD); Gandalf the White
Gandalf the Black
Advertisement
I fix it:

Here is how to rotate an object in D3DRM around Y:

1. Move the object back to origin:
SetPosition(scene,0,0,0)

2. Add a rotation
AddRotation(D3DRMCOMBINE_BEFORE,0,1,0,gDEGTORAD)

3. Translate to position
AddTranslation(D3DRMCOMBINE_AFTER /*IMPORTENT TO NOT SET BEFORE!!*/,posX,posY,posZ);





Gandalf the White
Gandalf the Black

This topic is closed to new replies.

Advertisement