-
Notifications
You must be signed in to change notification settings - Fork 17
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
Comments
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. |
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. |
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. |
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. |
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 negativepi
orpi / 2
.For example:
IDE 955 located at
-1980.7891, 142.6641, 27.0703
should have0.0, 0.0, 270.0
but shows356.8584, 0.0000, -1.5708
.IDE 956 located at
-2229.1875, 286.4141, 34.7031
should have0.0, 0.0, 180.0
but shows356.8584, 0.0000, 0.0000
.The text was updated successfully, but these errors were encountered: