Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Alright, so I'm currently debating how I want to do this. Basically this is what I'm trying to accomplish.

I've created a system to allow me to make my environment a little bit easier. I'm currently setting up a way to edit my models that I'll be rendering a bit easier. Currently I'm displaying their properties in a .NET Property Grid like so:

enter image description here

As you can see, I want to be able to rotate my model via 3 separate values. One represents the rotation around the X axis, one for the Y axis, and one for the Z axis. I'll be specifying the amounts in degrees (and converting to radians when necessary). I also want to have it rotate around the center of the object.

Here are the things I have to think about:

  • How to I unbiased rotate my model (considering I can only rotate one axis at a time via Matrix.CreateRotation[X/Y/Z](angle)

  • How to make sure it rotates around the center

  • Extract these three angles back out from a Matrix

  • How to properly rotate them so that it handles it all intuitively

What do you guys think?

share|improve this question
    
You know you can have two calls to Matrix.CreateRotation() in the same line, thus calling rotation on two or more axises simultaneously, right? –  Fibericon Sep 17 '12 at 8:00
    
@Fibericon :: Last I checked, Matrix.CreateRotation() doesn't rotate any axises simultaneously. My understanding is that it rotates them in the order that you multiply them which creates a different final rotation depending on the order. Take a look at my first bullet where I have addressed this. Correct me if I'm wrong, but I would like to see some credible resources because even from my testing I've only been able to confirm my beliefs as to how Matrix.CreateRotation() works. –  Xan Sep 17 '12 at 17:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.