Code:
void roateNodeTowardsTarget(ISceneNode* node, vector3df target)
{
vector3df direction = target - node->getPosition();
node->setRotation(direction.getHorizontalAngle());
}
Target ist hierbei die Position, an die sich deine Figur bewegen soll.
Wenn du keine sofortige komplette Rotation haben willst, dann musst du halt gucken, wie schnell sich deine Figur drehen soll und dann jeden Frame einen Teil der gesamtrotation dazuaddieren
_________________
Phenom X4 9950 BE | 6144MB DDR2-800 | GeForce 8800GT 512MB | Asus M3A32-MVP Deluxe | 2TB HDD | 520W Seasonic NT | Soprano Tower | Samsung 22" TFT + Fujitsu-Siemens 17" TFT + Toshiba 42" FullHD LCD | Windows 7 Proessional x64
Behind the Brain