I want to rotate a SceneNode
around it's parent. The docs say rotation is done relative to its parent, but apparently calling setRotation does not rotate it around the parent
my problem is best explained using sample code:
Code: Select all
pParent->setPosition(vector3df(0,0,0));
pChild->setParent(pParent);
pChild->setPosition(vector3df(-20,0,0));
//now, i want the child to get on position (20,0,0)
pChild->setRotation(0,180,0);
So basically what Im trying to achieve is to make pChild change position by rotating it around its parent, thus some sort of making half a circle with respect to its parent.
Im obviously doing it wrong, but how to do it correct?