문제

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