Skip to content
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

measure_text_system scale factor change detection watches the camera target's scale factor, not the text node's #17578

Open
ickshonpe opened this issue Jan 28, 2025 · 0 comments · May be fixed by #17579
Labels
A-Text Rendering and layout for characters A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior

Comments

@ickshonpe
Copy link
Contributor

ickshonpe commented Jan 28, 2025

Bevy version

main

What's wrong

measure_text_system queries for the camera entity of a text node and then using the camera entity looks up the camera target's scale factor. Then to detect if the scale factor has changed it looks up the camera's scale factor from the previous frame it keeps stored in a Local and compares them. But if the text node's target camera was changed since the previous frame it will be comparing the wrong scale factors and the text node's measure func won't be updated if its scale factor changed.

@ickshonpe ickshonpe added A-Text Rendering and layout for characters C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets labels Jan 28, 2025
@ickshonpe ickshonpe linked a pull request Jan 28, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Text Rendering and layout for characters A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant