Skip to content

Text Gizmos #16490

Open
Open
@Sigma-dev

Description

@Sigma-dev

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 think 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-GizmosVisual editor and debug gizmosA-TextRendering and layout for charactersC-FeatureA new feature, making something new possibleS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions