Example `free_camera_controller` UI text is rendering incorrectly.
- 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.
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
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