Light Doesn't work after first Init

  1. 4 months ago

    I know the fix to light was one of the last things added to goodbye_cmake but there is a little problem. When the editor creates a light it works as expected but when closing the editor and opening again reloading the scene the light no longer works. Even instancing the scene with the light through c++ doesn't work.

  2. fodinabor

    Dec 27 Administrator

    can you manually add lights to the scene in C++?

  3. The scene is acting a little weird. I'm try'n to create the light and a box manually through c++ but neither is showing up on screen.

  4. Alright i got the scene that was made with the editor to work with the light. Though i have to grab the light entity from the scene and re-add it in using addLight. Don't know if this is by design or a bug.

  5. fodinabor

    Dec 28 Administrator

    Uhm... Could you tell me which version you use exactly?
    The newest goodbye_cmake should not have addLight functions..

  6. Really? That's weird because doing this is valid. Maybe i'm using an older goodbye_cmake.

    level = new SceneEntityInstance(core, "main.entity"); camera = (Camera *)level->getEntityById("mainCamera", true); light = (SceneLight *)level->getEntityById("light", false); cube = (SceneEntity *)level->getEntityById("cube", false); //label2->setText(std::to_string(light->getPosition().x) + " " + std::to_string(light->getPosition().y) + " " + std::to_string(light->getPosition().z)); scene->addChild(level); scene->addLight(light);

  7. fodinabor

    Dec 28 Administrator

    Jep.. See changes of:
    https://github.com/ivansafrin/Polycode/commit/fee8794a2dbbd9b794a17140084d06742e357ba2
    Maybe try using the newest...

  8. Using the new one gives me a whole bunch of errors for running the Polycode Studio. I guess the new changes were not applied to the editor. I'll try and fix the errors to get the Editor running.

  9. 3 months ago

    Alright fixed the Editor and it's running as expected. Looking at the old goodbye_cmake and the new one that i cloned yesterday. It seems that the changes made to make the editor run got changed to some older version of the editor code.

 

or Sign Up to reply!