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

Make getAngleTo and getOrientation use the same range of values #72

Closed
wortzmanb opened this issue May 15, 2015 · 2 comments
Closed

Make getAngleTo and getOrientation use the same range of values #72

wortzmanb opened this issue May 15, 2015 · 2 comments

Comments

@wortzmanb
Copy link

getAngleTo is [-180, 180]
getOrientation is [0, 360]

@hawkerm
Copy link
Member

hawkerm commented May 16, 2015

Just a note, getOrientation is returning the value the Server provides, which we try to keep between 0 and 360 with the Rotate command, but it's not guaranteed that the physics engine stays in those bounds.

So, if you want to enforce this paradigm, you'll probably have to do the bounds check of the value in the method of the ObjectStatus class.

@wortzmanb
Copy link
Author

Make everything work in the range [0, 360] by adding a % 360 to all of:
ObjectStatus.getOrientation
ObjectStatus.getMovementDirection
Point.getAngleTo

@wortzmanb wortzmanb added this to the v1.1 - [Unscheduled] milestone May 18, 2015
@hawkerm hawkerm assigned hawkerm and unassigned wortzmanb May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants