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.
|