bevyengine / bevyengine/bevy

Example `free_camera_controller` UI text is rendering incorrectly.

Open
#22,955 1 comment 0 reactions 0 assignees View on GitHub
A-Text C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version and features

- main branch

## What you did

Run example `free_camera_controller`

## What went wrong

There are boxes in the top-left corner here.
Image

I believe this is caused by the `\t` character not rendering properly here. However, I’m not very familiar with this area, so I’m not sure how to fix this bug elegantly.
```rust
impl fmt::Display for FreeCamera {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"
Freecamera Controls:
Mouse\t- Move camera orientation
Scroll\t- Adjust movement speed
{:?}\t- Hold to grab cursor
{:?}\t- Toggle cursor grab
{:?} & {:?}\t- Fly forward & backwards
{:?} & {:?}\t- Fly sideways left & right
{:?} & {:?}\t- Fly up & down
{:?}\t- Fly faster while held",
self.mouse_key_cursor_grab,
self.keyboard_key_toggle_cursor_grab,
self.key_forward,
self.key_back,
self.key_left,
self.key_right,
self.key_up,
self.key_down,
self.key_run,
)
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start by running the `free_camera_controller` example and inspect the `FreeCamera` `fmt::Display` implementation shown in the issue. Check how its control text is passed to the UI and verify the result after adjusting the problematic rendering behavior; done means the top-left instructions display readable text without boxes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.