Is there something wrong with Matrix.CreateFromAxisAngle?

This may be a red herring but…

 Matrix next = Matrix.CreateFromAxisAngle(curr.Up, 1.7f) * curr;

1.7F radians = 97.4028251722399454 degrees

What are you expecting to happen?

For the problem in question, that won’t really make a difference. Any arbitrary rotation will either produce or not produce the distinctive symptoms that the original poster describes.

Sorry, I thought “I think you’re right” would be enough to say all my problems are solved for some reason…

1.7 radians was just a random value, it doesn’t matter. What I was actually trying to do was taking small values times input.

If anyone is curious what the issue was though. I am used to column major matrices and if you’re familiar with matrices you might remember B * A = (A^T * B^T)^T and row major matrices such as these are simply the transpose of a column major one, so the order in which transformations are applied is reversed. But this likely wouldn’t have been a problem and I would have just muddled through except that I thought the view matrix was just the world matrix of the camera which is apparently not true. So after switching the order the transformations were applied and regenerating the view matrix from it everything works fine.

1 Like

View matrix = Matrix.Invert( Matrix.CreateWorld(p,f,u) );
or use Matrix.CreateLookAt( p, f+p , u);