Quote:Original post by emeyex
When you say neither "worked," what does that mean?
I had a really, really strange bug (just by adding the realDir vector my scene disappeared - I just saw the clear color) but it works now.
Unfortunately my movement is still jumpy. I changed my yaw method to this:
void FreeCamera::yaw(double deltaX){ D3DXMATRIX rotY; D3DXMatrixRotationY(&rotY, D3DXToRadian(deltaX * rotationSpeed)); D3DXVec3TransformCoord(&dir, &dir, &rotY); D3DXVec3TransformCoord(&up, &up, &rotY); D3DXVec3Cross(&right, &up, &dir); const float lerpSpeed = 0.025f; D3DXVec3Lerp( &realDir, &realDir, &dir, lerpSpeed ); D3DXVec3Lerp( &realUp, &realUp, &up, lerpSpeed ); D3DXVec3Lerp( &realRight, &realRight, &right, lerpSpeed ); }
my pitch method (for looking down and up if the mouse is moved on the y-axis) to this:
void FreeCamera::pitch(double deltaY) { D3DXMATRIX rotAxis; D3DXMatrixRotationAxis(&rotAxis, &right, D3DXToRadian(deltaY * rotationSpeed)); D3DXVec3TransformCoord(&dir, &dir, &rotAxis); D3DXVec3TransformCoord(&up, &up, &rotAxis); const float lerpSpeed = 0.025f; D3DXVec3Lerp( &realDir, &realDir, &dir, lerpSpeed ); D3DXVec3Lerp( &realUp, &realUp, &up, lerpSpeed ); D3DXVec3Lerp( &realRight, &realRight, &right, lerpSpeed );}
and in all my camera translation methods I am now using the realXY vectors, for example:
void FreeCamera::moveForward(double deltaTime) { eye += realDir * translationSpeed * deltaTime;}
Did I make something wrong? Do you have an idea why its still jumpy (even if I constantly move the mouse in one direction the camera rotation jumps)
[Edited by - schupf on February 17, 2008 11:03:51 AM]