GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://gamedevtecnico.github.io/cubos/
MIT License
83 stars 23 forks source link

Transform Gizmos is rendered in wrong location on secondary cameras when splitting the screen #1148

Open RiscadoA opened 4 months ago

RiscadoA commented 4 months ago

Description

If split screen is enabled, the transform gizmos is shown in the wrong location in all but one of the cameras. This happens because the transform gizmos math is made for a specific camera, to ensure a constant scale.

Expected behaviour

All screens should show the transform gizmos in the correct position. One possible solution would be to allow restricting a gizmos instance to a specific camera when issuing the draw commands. Then, the transform gizmo plugin could issue draw commands for each of the active cameras.

Screenshots

image The green character is selected, but in the screen to the right the gizmo is drawn in a random location.