Jump to content
  • Advertisement


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

Move Equation HELP!

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

I''m trying to move objects forward/backwards in the way they are rotated... so far i have /* X rotation */ dir[0]=-sin(x*M_PI/180.0); dir[1]=cos(x*M_PI/180.0); dir[2]=0; /* X/Y rotation */ dir[0]=sin(x*M_PI/180.0); dir[1]=cos(y*M_PI/180.0); dir[2]=cos(x*M_PI/180.0)*sin(y*M_PI/180.0); but whats X/Y/Z and is the X/Y correct? After i find the rotations i add then into the positions of the object: pos.x+=temp*dir[0]; pos.y+=temp*dir[1]; pos.z+=temp*dir[2];

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!