How to make camera roll whilst strafing

Started by
13 comments, last by littletray26 11 years, 6 months ago

Does it happen on all 4 possible combinations of strafe and yaw? It could be the lack of indentation but i think the if/else chain in strafe control is broken... I'll check back when i have time to examine it better.


It happens in all 4 combinations. I've found the camera will end up leaning to the side of the direction I was strafing in. Also I don't think the if/else chain is broken. Perhaps you can see a problem in it I can't? The indentation seems to have been lost from VS to GameDev.
The majority of Internet Explorer users don't understand the concept of a browsing application, or that there are options.
They just see the big blue 'e' and think "Internet". The thought process usually does not get much deeper than that.

Worms are the weirdest and nicest creatures, and will one day prove themselves to the world.

I love the word Clicky
Advertisement
On closer look the if/else chain is correct, at first glace it seemed as if might be skipping the "unlean" part of the code in some instances. What does currentzrot look like after the problem has occurred?
After the problem has occurred currentZRot is 0.00000000
The majority of Internet Explorer users don't understand the concept of a browsing application, or that there are options.
They just see the big blue 'e' and think "Internet". The thought process usually does not get much deeper than that.

Worms are the weirdest and nicest creatures, and will one day prove themselves to the world.

I love the word Clicky
Have you tried what Erik suggested? I can't see any reason as to why, this is happening. But I have trouble enough debugging my own code, let alone someone elses. Your orthonormalization at the start of update looks sketchy, I don't think it does what you intend(I haven't used the d3dx library in a while, so i can't remember order of input/outputs for the cross product function).

Keep trying, you will solve your problem. It will likely be an AHA moment that wakes you from sleep, or hits you on the toilet, but keep plugging away at it.
I'll write the vectors to the screen and have a look tonight.

I sure hope so.
The majority of Internet Explorer users don't understand the concept of a browsing application, or that there are options.
They just see the big blue 'e' and think "Internet". The thought process usually does not get much deeper than that.

Worms are the weirdest and nicest creatures, and will one day prove themselves to the world.

I love the word Clicky

This topic is closed to new replies.

Advertisement