I want my ninja to follow another ninja as it moves. My method works except that it is facing its back towards the moving object rather than its from. Can anyone help me

Ogre::Vector3 theOffset(30, 0, 0);
mSceneMgr->getSceneNode("NinjaNode1")->setAutoTracking(
        true, mSceneMgr->getSceneNode("NinjaNode2"),Ogre::Vector3::UNIT_Z,theOffset);

I think i need to use offset but i'm really not used to setting positions using vector3... Can anyone flip my character around so that the front faces the moving object... thanks

有帮助吗?

解决方案

Try changing the 3rd parameter of setAutoTracking from UNIT_Z to NEGATIVE_UNIT_Z.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top