Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


3D X/Y/Z Mouse/Movements


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 3TATUK2   Members   -  Reputation: 730

Like
0Likes
Like

Posted 06 July 2012 - 07:17 PM

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?

Sponsor:

#2 3TATUK2   Members   -  Reputation: 730

Like
0Likes
Like

Posted 06 July 2012 - 09:40 PM

* had to factor in pitch and yaw




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS