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?
3D X/Y/Z Mouse/Movements
1 reply to this topic