Global TurnEntity maths ?

BlitzMax Forums/MiniB3D Module/Global TurnEntity maths ?

Warner(Posted 2009) [#1]
In Blitz3D, TurnEntity has a 'global' parameter that can be set to true. The object will then allways turn into the same direction, regardless it's orientation. I believe that it is different from the global parameter of RotateEntity, and it can perhaps best be compared to TranslateEntity.
I can simulate this in minib3d by attaching the object to a pivot, and then rotating this pivot, see the example below.
But I would like to know how it works in a mathematical sense. Suppose I could only use RotateEntity and EntityPitch/Yaw/Roll, how could I calculate the pitch/yaw/roll that are needed to perform this rotation?
Does anybody know, or can someone point me towards some information about this? I tried searching, but I don't know what terms to use. Thanks in advance.



Warpy(Posted 2009) [#2]
I think it's to do with the order in which rotations are applied. I can't think of an easy way of explaining it without getting into a load of maths.