angle/vector conversion question

Posted By: Reconnoiter

angle/vector conversion question - 05/23/17 12:47

Hey,

Does someone here know what the formula is from pan+roll to pan+tilt, while keeping the angle's direction?

So in other words, the angle is facing the right direction but I want to let it use the tilt value and not the roll value.

It probably has something to do with cosinus and sinus but my brain failing me in my math calculations. grin
Posted By: Ezzett

Re: angle/vector conversion question - 05/24/17 08:33

You need at least three values to describe an orientation in three dimensional space.

For arbitrary values you can't convert pan+roll to pan+tilt.

But for just looking to the right direction the pan value alone should be enough. Or what do you mean with "facing right"? Do you have any constraints for your angles? Maybe you could also change the orientation of a model in MED so you could rotate it in your game via pan+tilt instead of pan+roll.
Posted By: Reconnoiter

Re: angle/vector conversion question - 05/24/17 09:36

Yeah sorry, I mean pan + roll + 0 tilt to pan + tilt + 0 roll. With facing the right direction I mean including looking up or down at specific angles.
Posted By: Ezzett

Re: angle/vector conversion question - 05/24/17 11:42

Ok, you are using roll to look up and down (that was not clear to me) and now you want to change this to tilt.

Did you already try to convert the pan-roll-angle to a vector via vec_for_angle and back to a pan-tilt-angle via vec_to_angle?
Posted By: txesmi

Re: angle/vector conversion question - 05/24/17 14:00

Originally Posted By: Ezzett
Maybe you could also change the orientation of a model in MED so you could rotate it in your game via pan+tilt instead of pan+roll.

That is the only way indeed.

A direction vector is fully described by pan and tilt. Roll is the rotation around that vector, a non described property in a direction vector, so you have not made yourself understood. Be more specific, please.
Posted By: Reconnoiter

Re: angle/vector conversion question - 05/24/17 14:10

Originally Posted By: Ezzett
Did you already try to convert the pan-roll-angle to a vector via vec_for_angle and back to a pan-tilt-angle via vec_to_angle?
, thanks

Originally Posted By: txesmi
A direction vector is fully described by pan and tilt. Roll is the rotation around that vector, a non described property in a direction vector, so you have not made yourself understood. Be more specific, please.
, I already said I was sry for the confusion wink , what more do you want me to say?
Posted By: txesmi

Re: angle/vector conversion question - 05/26/17 04:30

Sorry my curtness. I was not scolding you. I just wanted to understand.
© 2024 lite-C Forums