you could write that in general:
Code: Select all
vector3df v = TargetNode->getPosition() - CurrentNode->getPosition()
vector3df angle = v.getHorizontalAngle() + StartRotation;
Node->setRotation(angle);
Code: Select all
vector3df v = TargetNode->getPosition() - CurrentNode->getPosition()
vector3df angle = v.getHorizontalAngle() + StartRotation;
Node->setRotation(angle);