quaternions - How to set object's / node's absolute rotation correctly? -
usually when want rotate object/node in ogre scene call node's rotate() method. rotates node locally relative it's current rotation. example, when start 0 rotation, rotate twice 5 degrees 1 axis, after second call object rotated 10 degrees in total.
now need set absolute rotation of node/object directly, regardless of current rotation. thus, don't know objects current rotation, need set 45 degrees on x axis. setrotation().
i know there setorientation() method in scenenode class, expects quaternion object. know can current orientation quaternion. don't know: how can use/change current orientation quaternion set new absolute rotation of node?
you can find written introduction quaternions , ogre here: http://www.ogre3d.org/tikiwiki/quaternion+and+rotation+primer
especially resetting orientation might of interest.
Comments
Post a Comment