• Advertisement
Sign in to follow this  

3D X/Y/Z Mouse/Movements

This topic is 2059 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 having some trouble with 3D math... I'm writing a game engine and implementing mouse/movements... I have X/Y/Z variables which work as follows: -X moves things to the left, +X to the right, -Y down, +Y up, -Z in, +Z out... My current key codes are here: http://bpaste.net/raw/ZaIPvc9RT7QabnUpQclC/ ... Now, LEFT/RIGHT(horizontal strafe) work perfectly, the problem is with UP/DOWN(forward/back)... It works 'some' of the time, until, for example... I'm at the top of the scene looking straight down (with a self.x_axis_rotation of 90) and I press forward... it moves on a *diagonal* downward instead of *straight* down as expected... I think something is wrong/missing related to how I update self.z and possibly self.x_axis_rotation .. Any clues?

Share this post


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

  • Advertisement