What means D3DRMCOMBINE_REPLACE in:
m_pCube->AddRotation(D3DRMCOMBINE_BEFORE,
0,1,0,g_DEGTORAD);
Gandalf the White
D3DRM Rotate
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement