i am currently trying to make a RTS camera for a mini-project i have. So far i research about detecting the mouse position to the side of the window and move the camera but so far i tried and can't make the camera move. Below is my code
bool DemoApp::processUnbufferedInput(const Ogre::FrameEvent& evt)
{
Ogre::Vector3 transVector = Ogre::Vector3::ZERO;
mMoveScale = 250;
if(mMouse->getMouseState().X.abs > (mWindow->getWidth() - 20))
{
transVector.z -= mMoveScale;
}
mSceneMgr->getSceneNode("cameraNode")->translate(transVector *evt.timeSinceLastFrame, Ogre::Node::TS_LOCAL);
return true;
}
Am i doing it wrong?