Skip to content

Text Gizmos #16490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Sigma-dev opened this issue Nov 23, 2024 · 5 comments
Open

Text Gizmos #16490

Sigma-dev opened this issue Nov 23, 2024 · 5 comments
Labels
A-Gizmos Visual editor and debug gizmos A-Text Rendering and layout for characters C-Feature A new feature, making something new possible S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@Sigma-dev
Copy link
Contributor

What problem does this solve or what need does it fill?

Gizmos are mainly used (atleast from my experience) to quickly add information vizualization without much effort
They fill this work great, but sometimes we want to gizmo more complex data visible than shapes can handle.
Things like names, lengths, values etc...

What solution would you like

gizmos.text(position, size, "text");
gizmos.text_2d(position, size, "text");

Would draw text always upright always facing the camera.
The size given would be in world space, so the text would be sized according to distance like any other object.
The 3d/2d variants simply change the position to be Vec2 vs Vec3

What alternative(s) have you considered?

Logging is not as indicative, I can't thing of any thing that could get the diversity of information like a text gizmo would.

Additional context

The simplest way to get something like it working would be to encode every alpha-numeric character as a shape (a-z A-Z 0.9 and maybe some symbols). Then only allow these characters to be displayed.

Fonts are kind of a pain to implement, though bevy already has abstractions around them but I don't know enough to know if it's a viable approach.

If the manual symbol approach is chosen then I could probably implement it and open a PR for it.

@Sigma-dev Sigma-dev added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Nov 23, 2024
@alice-i-cecile alice-i-cecile added A-Gizmos Visual editor and debug gizmos A-Text Rendering and layout for characters S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed S-Needs-Triage This issue needs to be labelled labels Nov 25, 2024
@alice-i-cecile
Copy link
Member

I'd like to try and integrate this with Bevy's existing text rendering if possible. This is doubly useful with weird symbol fonts. I share the desire for quick-and-dirty worldspace text for debugging though!

@Preston-Harrison
Copy link

Was just googling for this feature and found this issue. I would really love this!

@colleen05
Copy link

Bump! I'd really like this feature.

@jakkos-net
Copy link
Contributor

Not sure if people will find this useful, but if you need a janky solution for right now, it's pretty quick to do with bevy_egui: https://gist.github.com/jakkos-net/7f1d2806fae0288a11f3eb0840a11b04

@Vrixyz
Copy link
Member

Vrixyz commented Mar 27, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Gizmos Visual editor and debug gizmos A-Text Rendering and layout for characters C-Feature A new feature, making something new possible S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

6 participants