auto entity = sceneManager.createEntity("Robot"); auto model = sceneManager.createModel("RobotModel.mesh"); entity->setModel(model); entity->setPosition({0,0,0});
auto lightEnt = sceneManager.createEntity("Light"); auto light = sceneManager.createLight(); lightEnt->setLight(light); light->setType(LT_DIRECTIONAL); light->setDirection({-1,-1,-1});This example demonstrates how to create an entity with a given name "Light" and a light component. It sets the type of the light to "directional" and the direction it is facing to {-1,-1,-1}. The package library for SceneManager might be Ogre3D.