
I have implemented a simple third person camera that works with the Razor model. Now I am trying to make it work with the Robot model and have a problem.
Code: Select all
Vector3 newCamPosition = mNode->getOrientation() * Vector3(0, 0, 500) * Vector3::UNIT_Z;
mNode->addChild(camNode);
camNode->setPosition(newCamPosition);
I tried this
Code: Select all
Vector3 robotCorrection = mNode->getOrientation() * Vector3::UNIT_X;
Vector3 newCamPosition = robotCorrection * Vector3(0, 0, 500) * Vector3::UNIT_Z;
mNode->addChild(camNode);
camNode->setPosition(newCamPosition);