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

Gizmos::arc_2d uses clockwise angles for some reason #13614

Closed
mweatherley opened this issue May 31, 2024 · 2 comments · Fixed by #13610
Closed

Gizmos::arc_2d uses clockwise angles for some reason #13614

mweatherley opened this issue May 31, 2024 · 2 comments · Fixed by #13610
Labels
A-Gizmos Visual editor and debug gizmos C-Bug An unexpected or incorrect behavior C-Usability A simple quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@mweatherley
Copy link
Contributor

Bevy version

Current development branch.

What you did / what went wrong

A wonderful PR author ran into this weird mismatch while writing gizmo code: the arc_2d method expects a clockwise angle, while the angle supplied for the primitives_Nd method is counterclockwise. As far as I can tell, this may be literally the only place in the entire codebase that uses clockwise angles, which seems needlessly confusing. The method could just use counter-clockwise angles like everything else.

@mweatherley mweatherley added C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! A-Gizmos Visual editor and debug gizmos D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels May 31, 2024
@alice-i-cecile alice-i-cecile added the C-Bug An unexpected or incorrect behavior label May 31, 2024
@alice-i-cecile
Copy link
Member

Encountered in #13610.

@Olle-Lukowski
Copy link
Contributor

Olle-Lukowski commented Jun 1, 2024

I can open a PR for this, and maybe merge both PR's at the same time so #13610 doesn't need to be changed?
EDIT: I think these are similar enough for being in the same PR, so I'll go and add it.

github-merge-queue bot pushed a commit that referenced this issue Jun 1, 2024
…rSector`, and make arc_2d use counter-clockwise angle. (#13610)

# Objective

Fixes #13606.
Also Fixes #13614.

## Solution

Added the missing trait impls, and made `gizmos.arc_2d()` work with a
counter-clockwise angle.
## Testing

- Updated the render_primitives example, and it works.
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 C-Usability A simple quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
3 participants