0

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?

user2640299
  • 25
  • 1
  • 8
  • Looks like it should work. You'll probably have to do some debugging. First, make sure your function is getting called, and your `if` is firing. Then I'd try tracing the values of evt.timeSinceLastFrame transVector. –  May 11 '14 at 10:15
  • oh thanks...my function didn't get called...thanks man haha – user2640299 May 11 '14 at 11:15

0 Answers0