Camera3D -> unproject_position()
Convert a 3D position to screen coordinate to position a UI element in 3D space.
Great for health bars ♥
#GodotEngine
Convert a 3D position to screen coordinate to position a UI element in 3D space.
Great for health bars ♥
#GodotEngine
Comments
I notice it doesn't scale though with distance.
If you need that, use a Sprite3D with billboard enabled and a viewport texture containing the control.
You could scale manually or set a default size and maintain it.
Thanks for the tip!
unproject_position3d has many other uses, though, mainly when you want to connect a 3d object with (normal) UI nodes.