50 likes | 64 Views
Overview of Ogre Basic Tutorials 2, 4, and Unbuffered Input. By: Chad Adams & Nathan Griffin. Tutorial 2. Loading a Ninja mesh Creating a textured floor Create lights Basic unbuffered input Set shadow cast https://www.cse.unr.edu/~sushil/class/381/tutorials/movies/OgreBasicTutorial2.mp4.
E N D
Overview of Ogre Basic Tutorials 2, 4, and Unbuffered Input By: Chad Adams & Nathan Griffin
Tutorial 2 • Loading a Ninja mesh • Creating a textured floor • Create lights • Basic unbuffered input • Set shadow cast • https://www.cse.unr.edu/~sushil/class/381/tutorials/movies/OgreBasicTutorial2.mp4
Tutorial 4 • Create an entity to move • Unbuffered input handling • https://www.cse.unr.edu/~sushil/class/381/tutorials/movies/OgreBasicTutorial4.mp4
Basic Unbuffered Input Use // Moving the Ninja Ogre::Vector3 dirVec = Ogre::Vector3::ZERO; if (mKeyboard->isKeyDown(OIS::KC_I)) dirVec.z -= move; if (mKeyboard->isKeyDown(OIS::KC_J)) { if (mKeyboard->isKeyDown(OIS::KC_LSHIFT)) mSceneMgr->getSceneNode("NinjaNode")->yaw(Ogre::Degree(5 * rotate)); else dirVec.x -= move; }
Input Toggle Timers // Second toggle method toggleTimer -= fe.timeSinceLastFrame; if ((toggleTimer < 0) && mMouse->getMouseState().buttonDown(OIS::MB_Right)) { toggleTimer = .5; Ogre::Light* light = mSceneMgr->getLight("PointLight"); light->setVisible(!light->isVisible()); }