Task Overview
In flecs (ecs framework), there is an API for the flecs::world registry where we can describe conditions using the flecs::world::component<UComponent>.
This would be a good opportunity to look into flecs relationships to allow for automating actively looking at specific editor cameras based on an active component. Rather then checking everytime, which is what is currently being done in the current implementation.
Task completion?
The way I would see the functionality of this task to go is we should be able to see something similar or if not the same as the working code below.
Which is expected to do the following functionality regarding which editor camera to use.
auto camera1 = entity("Camera1");
camera1.set<atlas::perspective_camera>({....});
// Makes "Camera1" the currently active camera
camera1.add<atlas::active_camera>();
auto camera2 = entity("Camera2");
camera2.set<atlas::perspective_camera>({....});
// Makes "Camera2" the currently active camera
// "Camer1" is no longer the current editor camera
camera2.add<atlas::active_camera>();
// Using systems to execute this API or something like that.
// This should only be getting Camera 2
query_builder.with<atlas::active_camera>().each([](atlas::perspective_camera& p_camera){
// do stuff (no checks)
});
Task Overview
In flecs (ecs framework), there is an API for the
flecs::worldregistry where we can describe conditions using theflecs::world::component<UComponent>.This would be a good opportunity to look into flecs relationships to allow for automating actively looking at specific editor cameras based on an
activecomponent. Rather then checking everytime, which is what is currently being done in the current implementation.Task completion?
The way I would see the functionality of this task to go is we should be able to see something similar or if not the same as the working code below.
Which is expected to do the following functionality regarding which editor camera to use.