2D Gizmos Overlayed onto a 3D Scene #13565
Unanswered
Davidian1024
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to directly use gizmos to render 2D gizmos over a 3D scene? I've been able to get the effect I want by translating from 3d world coordinates to the coordinates of the 3d viewport to 2d world coordinates. But this requires me to have two cameras, with the 2d camera overlayed on top of the 3d camera using RenderLayers. I was hoping for a method that didn't require this multi-camera layered setup.
The specific example use case I have in mind is a targeting system. Something that would put something like crosshairs over each target in the scene. These crosshairs would not shrink into distance as the objects get further from the camera. They would be present no matter how far away they are.
Here's a code snippet that handles the translation from 3d to 2d:
I feel I should also mention. I've wanted similar functionality from gizmos that don't depend on 3d viewport coordinates. Something like a graphical hud that can display meters, dials, progress bars, etc.
I guess the main reason I ask this is because of what I've seen possible with Text. I would like to be able to render 2D gizmos over top of my 3D scene the same way that I can render Text over top of my 3D scene.
Beta Was this translation helpful? Give feedback.
All reactions