Add support for initial values in json file

This commit is contained in:
2021-01-11 15:26:55 +01:00
parent d4b3a00d73
commit 737747a46c
3 changed files with 35 additions and 9 deletions

View File

@@ -276,11 +276,11 @@ void Controller::renderImGui(World &world, PointLight *pointLight, glm::vec3 *li
ImGui::Checkbox("Rotate Object", rotateEntity);
Entity *mainObject = world.getEntityById(0);
mainObject->setPosition(glm::vec3(translation[0], translation[1], translation[2]));
//mainObject->setPosition(glm::vec3(translation[0], translation[1], translation[2]));
if (!*rotateEntity) {
mainObject->setRotation(glm::vec3(0.f, 1.0f, 0.f), rotation);
//mainObject->setRotation(glm::vec3(0.f, 1.0f, 0.f), rotation);
}
mainObject->setScale(scale);
//mainObject->setScale(scale);
// color picker
ImGui::Text("\nLight Source");