So I'm building an engine to try and learn some math and programming and right now Im implemting camera movement and rotation. But I got a bug
Here is my video of my bug I have right now
https://www.youtube.com/watch?v=z1L5nySqRiw&feature=youtu.be
Here is the log file showing that the up-vector is being changed while the camera is at the polar regions looking down towards origin. When I yaw the camera at this position the only forward and right should change, but the up vector is also being changed right now.
[code][17:18:21:727] Camera Forward x: -0.000000
[17:18:21:728] Camera Forward y: -0.965925
[17:18:21:728] Camera Forward z: -0.258819
[17:18:21:728] Camera Position x: 0.000000
[17:18:21:728] Camera Position y: 9659.257813
[17:18:21:728] Camera Position z: 2588.190674
[17:18:21:728] Camera Up x: -0.000000
[17:18:21:728] Camera Up y: 0.258819
[17:18:21:728] Camera Up z: -0.965925
[17:18:21:729] Camera Right x: -1.000000
[17:18:21:729] Camera Right y: 0.000000
[17:18:21:729] Camera Right z: 0.000000
[/code]
[code][17:21:41:530] Camera Forward x: -0.061187
[17:21:41:533] Camera Forward y: -0.965925
[17:21:41:534] Camera Forward z: -0.251483
[17:21:41:534] Camera Position x: 0.000000
[17:21:41:534] Camera Position y: 9659.257813
[17:21:41:534] Camera Position z: 2588.190674
[17:21:41:534] Camera Up x: -0.228352
[17:21:41:534] Camera Up y: 0.258819
[17:21:41:534] Camera Up z: -0.938545
[17:21:41:534] Camera Right x: -0.971654
[17:21:41:534] Camera Right y: 0.000000
[17:21:41:534] Camera Right z: 0.236407
[/code]
And lastely here is the code controlling all of this:
Mars - The Next Frontier Rotation bug
Pastebin
[C++] //Pitch, Yaw, Roll called by from another class mCamera->Ro...