Ogre::SceneNode* myNode = mySceneManager->getRootSceneNode()->createChildSceneNode(); myNode->translate(Ogre::Vector3(5.0f, 0.0f, 0.0f));
Ogre::SceneNode* myNode = mySceneManager->getRootSceneNode()->createChildSceneNode(); ... // In an input handler function if (keyPressed == LEFT_ARROW) { myNode->translate(Ogre::Vector3(-1.0f, 0.0f, 0.0f)); }This code creates a new SceneNode and adds it as a child of the root node. Then, in an input handling function, if the user presses the left arrow key, the node is translated by 1 unit along the negative X-axis. Package library: Ogre 3D Graphics Engine.