Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


World translation and rotation problem

This topic is 6539 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

okay here''s the situation. I have a model I loaded into my program. Within the main render loop I call a function to translate(using global posistion variables from an input function for location), rotate and then render my model. When I just translate it it works fine (the input variables work like they should). However, when I then apply a rotate the directions are all screwy. for instance: the ZPos would now control the Y Axis location?? I''m very confused, any help would be greatly appreciated. Oh yeah, I am using the D3DUtil_ functions for my manipulations (incase that matters). -Prairie

Share this post

Link to post
Share on other sites
You might be confusing your "up" and "in" directions between model space and world space, like I did originally. Verify that "Y" points "up" in all cases...

Share this post

Link to post
Share on other sites
Here''s the code for the models render routine, once again thanks


void RenderShip()
//SetUp General ID Matrix

//First Translate the Ships Posistion, Y axis is a
D3DMATRIX ShipPos=mat;

//Second Rotate the Ship
D3DMATRIX matRotXAxis=mat;

D3DMATRIX matPlayer=mat;
g_pD3DDevice->SetTransform( D3DTRANSFORMSTATE_WORLD,


//Set world back to original

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!