سؤال

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