Enum TextPositionMode
- Namespace
- Stride.CommunityToolkit.Rendering.Text
- Assembly
- Stride.CommunityToolkit.dll
How an EntityTextComponent decides where on the screen to draw.
public enum TextPositionMode
Fields
Anchored = 2Snaps to a corner of the window, offset by Offset.
This is the mode for a HUD. Because the corner is resolved against the window each frame, the text stays put when the window is resized, which fixed pixel positions do not.
Screen = 1Draws at ScreenPosition, in pixels from the top-left of the window, ignoring where the entity is.
The entity's position is not consulted at all, so the text is never culled for being out of view. Fixed pixels do not move when the window is resized, which makes this the wrong choice for anything anchored to an edge - use Anchored for that.
World = 0Follows the entity, by projecting its world position into screen space. The text is hidden when the entity is behind the camera or outside the view.
This is the mode for labelling things in the scene - a name over a character, a coordinate on a vertex, a damage number above whatever took the hit.