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

Invalid rotation for default objects #5

Open
oscar-broman opened this issue Sep 5, 2016 · 4 comments
Open

Invalid rotation for default objects #5

oscar-broman opened this issue Sep 5, 2016 · 4 comments

Comments

@oscar-broman
Copy link

I see that a lot of default objects get the rotation 356.8584, 0.0000, -1.5708 or similar values. It usually contains angles positive or negative pi or pi / 2.

For example:
IDE 955 located at -1980.7891, 142.6641, 27.0703 should have 0.0, 0.0, 270.0 but shows 356.8584, 0.0000, -1.5708.
IDE 956 located at -2229.1875, 286.4141, 34.7031 should have 0.0, 0.0, 180.0 but shows 356.8584, 0.0000, 0.0000.

@Crayder
Copy link

Crayder commented Sep 5, 2016

I've always just reset the rotation manually. Then the Z angle is usually just a multiple of 90, and if not it's like always a whole number.

But yes, this needs fixed.

@JernejL
Copy link
Owner

JernejL commented Sep 12, 2016

This is not a bug.

I've explained this a few times on sa-mp forums. It's not possible to always properly convert a sa-mp ipl quaternion to euler angles due to gimbal lock and other related problems.

If you have a solution that will always work i will gladly approve a pull request.

@oscar-broman
Copy link
Author

I've also ran into the same problems when trying to do batch conversions of IPL files.

One more practical approach that comes to mind is testing the known problematic angles, and re-applying them then see if the quaternions match. It would probably require about 6 attempts to fix 99% of the problematic cases.

@JernejL
Copy link
Owner

JernejL commented Sep 12, 2016

It's still manual work to do imo, i got no idea how to identify "problematic angle" scenarios automaticly. I will not work on workarounds for this. I will accept a pull request if anybody else smarter gets a workaround that is actually fully working.

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

No branches or pull requests

3 participants