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

GuiObject can't decide which way it should be rotated #1

Closed
string-dot-byte opened this issue Oct 18, 2021 · 2 comments
Closed

GuiObject can't decide which way it should be rotated #1

string-dot-byte opened this issue Oct 18, 2021 · 2 comments
Assignees
Labels
bug Something isn't working fixed good first issue! Good for newcomers

Comments

@string-dot-byte
Copy link

I'm using Nature2D along with a drag module to be able to drag the GuiObject across the screen. When dragging, I noticed that the ImageLabel kept rotating upwards and downwards and couldn't decide even if my mouse was kept still while holding.

I attached the place file where this issue occurs below in a mega. It also appears that smaller sizes of GuiObjects are not effected by this bug.
https://mega.nz/file/ORcTXI6T#N3Jh9cpRK976d2nQsBfzw4O4jnoJaaBx7WX6-rGujU4

@jaipack17
Copy link
Owner

Ah, I see. Something to do with math.atan2() along the way. Rotating the UI element internally was merely just the angle between the positions of the topLeft and topRight corners. Thus, when the body is at rest, it tends to fluctuate between the 0° mark and 180° mark.

I'll release a fix to this in the next release today. Thanks for bringing this to my attention. I'll close the issue after notifying you about the fix. Cheers!.

@jaipack17 jaipack17 added bug Something isn't working good first issue! Good for newcomers labels Oct 18, 2021
@jaipack17 jaipack17 self-assigned this Oct 18, 2021
jaipack17 added a commit that referenced this issue Oct 18, 2021
@jaipack17
Copy link
Owner

@string-dot-byte This should be fixed now! If you encounter the bug again, you can open another issue for the same!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed good first issue! Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants