code refactoring

This commit is contained in:
ohyzha
2024-11-04 22:48:35 +02:00
parent 3d96889778
commit e2df88ca22
7 changed files with 71 additions and 45 deletions

View File

@@ -88,7 +88,10 @@ namespace OpenVulkano
virtual void SetCamera(Camera* camera)
{
this->camera = camera;
camera->scene = this;
if (!camera->scene)
{
this->GetRoot()->AddChild(camera->GetRoot());
}
}
Camera* GetCamera() const