Time for action — finding out what's missing

We are using the previously suggested code to find out what is missing in our scene.

  1. After the creation of the light, add code to create an instance of Sinbad.mesh and also create a node and attach the model to it:
    Ogre::Entity* Sinbad = mSceneMgr->createEntity("Sinbad", "Sinbad.mesh");
    Ogre::SceneNode* SinbadNode = node->createChildSceneNode("SinbadNode");
    
  2. Then scale Sinbad to three times his size and move him a bit upwards; otherwise, he will be stuck in the plane. Also add him to the scene node, so he will be rendered:
    SinbadNode->setScale(3.0f,3.0f,3.0f);
    SinbadNode->setPosition(Ogre::Vector3(0.0f,4.0f,0.0f));
    SinbadNode->attachObject(Sinbad);
    
  3. Compile and run the application.

What just happened?

We added ...

Get Ogre 3D 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.