• Create Account

### #ActualDJTN

Posted 26 July 2012 - 10:52 AM

Well now I’ve got another issue pertaining to the velocity. It’s changing incorrectly.

If I have a velocity vector (0, 0 ,10) and I do a matrix transform based off the rotations of the camera (pitch, roll, yaw), the velocity should always be pushing away from the camera. The problem is that the velocities Y is fluctuating up and down with the slightest change in the camera's pitch.

### #1DJTN

Posted 25 July 2012 - 04:21 PM

Well now I’ve got another issue pertaining to the velocity. It’s changing incorrectly.

I transform the coordinates of the velocity vector by a rotation (yaw/pitch/roll) matrix that I calculate by decomposing the view matrix. Everything works as expected except the pitch affecting the velocity vector is different depending on the yaw. If I don’t change the pitch of the camera and only rotate on the yaw axis (spinning the camera around clock-wise), the pitch goes up and down. This has to be a math problem but I cannot pin point it.

I have access to my camera class but I do not use pitch, rotation and yaw calculations. My camera rotates using angles:

  CamTarget.Y = radius * Sin(vRadians)