I was wondering if it was possible to take some matrix orientation value and convert them with math into angle degree …

cheers

I was wondering if it was possible to take some matrix orientation value and convert them with math into angle degree …

cheers

sure, it’s possible, but in general the matrix is much more useful…

I haven’t really messed around with that, but I believe you’re looking for something called arctan2- that’s a formula that some other programs (gamemaker, for example) use to convert xy vectors to angles. I believe it’s 2d though, so you might have to find a 3d version or change the formula

…sorry I can’t help you much, but I hope I at least pointed you in the right direction

Well, in a camera tracking data importer I wrote a while back,(page4 of python sub-forum) the imported files use a matrix to specify camera orientation. As I recall, I just read that info from the file and chucked into a matrix that I then made to be the object’s (the camera) orientation matrix.

You can then get the RotX, RotY and RotZ values from this camera.

I’d be inclined to cheat on this, and pretty much avoid the use of any maths at all. (only cos I can’t remember how to do it:ba:) I’d just create a camera object, dump the matrix into it and then query it’s rotx, roty and rotz values, before deleting(unlinking) the camera object when I was done.

I got the idea after reading through one of the python scripts that was exported from Voodoo. Anyway, you can find the script I wrote and some sample data for it here.

Perhaps it’ll help you out.

I find a way calculating angles but without using matrix but I would be useful if someone puts some link to some basic math calculs we need to use blender as matrix or anything. I know there is a small tutorial but I really didnt understand it.