Skip to content

[DRAFT] Bug fix in Gizmo grid #19697

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

theotherphil
Copy link
Contributor

Objective

Fix #19480

Solution

Fix calculation of line counts in each direction

Testing

TODO!

Currently just an example I ran locally:

image

@theotherphil
Copy link
Contributor Author

theotherphil commented Jun 17, 2025

What's the best way to add tests for this @mockersf ? I remember talk of you having automated testing based on running examples but I failed to find the docs for this.

Also: how does anyone feel about changing the outer_edges_* names? I found it confusing that in 2d outer_edges_x means draw the top and bottom and outer_edges_y means draw the left and right - I would have expected the other way around. Maybe there are clearer names available (I claim, while conspicuously not suggesting any).

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Gizmos Visual editor and debug gizmos S-Needs-Help The author needs help finishing this PR. labels Jun 18, 2025
@rparrett
Copy link
Contributor

You could add to Scene::Gizmos in

https://github.com/bevyengine/bevy/blob/main/examples/testbed/2d.rs
https://github.com/bevyengine/bevy/blob/main/examples/testbed/3d.rs

How does anyone feel about changing the outer_edges_* names?

It feels pretty ambiguous to me, and either interpretation could be plausibly correct. I also can't think of better names, but I do think that perhaps the docs could potentially be improved with language like "parallel to the x axis" instead of "along the x axis."

@theotherphil
Copy link
Contributor Author

Aha! Thanks, that's what I was failing to find.

I don't have strong opinions on the names - I could just clarify the docs. I considered outer_(left_right|top_bottom|front_back) but I'm not sure if that's better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Gizmos Visual editor and debug gizmos C-Bug An unexpected or incorrect behavior S-Needs-Help The author needs help finishing this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grid gizmo with either x or y outer edges doesn't render correctly
3 participants