Skip to content

Conversation

@joshuaprince
Copy link
Contributor

2025-01-10.20-48-44.webm

When a player rotates so that they pass the "due-north" angle, their angle goes from (e.g.) 359deg to 1deg, and the CSS transform treats this as a full 358-degree counterclockwise rotation. Very mildly annoying!

Instead, by finding the closest equivalent angle, all rotations are as short as they can be.

2025-01-10.20-49-58.webm

Logic credit: https://stackoverflow.com/a/53416030

@joshuaprince
Copy link
Contributor Author

Just spotted #313 which this fixes.

Copy link
Owner

@jpenilla jpenilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@jpenilla jpenilla linked an issue Jan 12, 2025 that may be closed by this pull request
@jpenilla jpenilla merged commit 3746f4b into jpenilla:master Jan 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange behavior of player marker when turning between certain angles

2 participants