Skip to content

Skyboxes

Maurizio Vitale edited this page Jan 27, 2020 · 2 revisions

Urho3D uses the model component Skybox to add backgrounds to a scene. It renders behind other models and moves with the camera to appear static.

To load a model as a Skybox:

skyNode=scene_->CreateChild("Sky");
Skybox* skybox=skyNode->CreateComponent<Skybox>();
skybox->SetModel(cache->GetResource<Model>("Models/Box.mdl"));
skybox->SetMaterial(cache->GetResource<Material>("Materials/Skybox.xml"));