Still on that lighting system i’m working on id like to, when debugging and testing, the dev team have the option to not only see the light source represented as a lamp but also have below this sprite its id object so it can have its properties altered in real time. In real game scenario, with no test and stuff, the game would never draw these lamps and their ids. But back to the problem, this is what it looks like while debugging and testing with a far camera:
note that the lamps sprites in billoboarding, do have a fixed scale, while the gui components do NOT have a fixed scale and will get bigger or smaller based on the distance of the camera. What id like to do is to have the GUI in a fixed scale. For that i could render them in the world space. That turned out to be quite difficult, since gui components only accept world space vertices, so no billboarding for them. Any help is appreciated!
I’ve never tried it myself so it might be a dead end, but have you looked into using Labels instead of GUI nodes? Since they are separate components like Sprites and already meant to be rendered in world space.
OK, I wasn’t sure how the billboarding stuff worked. If this is really only for limited debugging purposes, then yeah, I would just do the most simple thing and add an object with a label and a script that rotates it towards the camera.
The other option is to scale the GUI text node. I don’t know the math off the top of my head, but you should be able to take the FOV of your camera, the distance to the camera, and…the viewport dimensions?, and calculate the scale to keep it a uniform size on screen.