How to create node three and then add it to the scene?
Node* result = new Node(context_);
Model* model = cache->GetResource<Model>("Models/Mushroom.mdl");
Material* material = cache->GetResource<Material>("Materials/Mushroom.xml");
Node* node = result->CreateChild();
StaticModel* staticModel = node->CreateComponent<StaticModel>();
staticModel->SetModel(model);
staticModel->SetMaterial(material);
staticModel->SetCastShadows(true);
node->SetPosition(Vector3(0, 0, 0));
scene_->AddChild(result); // do not works, model is not added to scene
Node* result = new Node(context_);
scene_->AddChild(result); // ------------------------ it's work
Model* model = cache->GetResource<Model>("Models/Mushroom.mdl");
Material* material = cache->GetResource<Material>("Materials/Mushroom.xml");
Node* node = result->CreateChild();
StaticModel* staticModel = node->CreateComponent<StaticModel>();
staticModel->SetModel(model);
staticModel->SetMaterial(material);
staticModel->SetCastShadows(true);
node->SetPosition(Vector3(0, 0, 0));