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

Element rotations are different for certain element types #866

Closed
Einheit-101 opened this issue Apr 11, 2019 · 4 comments
Closed

Element rotations are different for certain element types #866

Einheit-101 opened this issue Apr 11, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@Einheit-101
Copy link

Description
Now for a very long time using setElementRotation gives different results for Peds, vehicles and objects. Even if i choose the same rot order and conformPedRotations i still cant rotate a ped exactly like an object.

To reproduce
-Create a ped, set his rotation to 45, 45, 0
-Create an object, set its rotation to 45, 45, 0
-Note how the rotation of the ped never matches with the object, i could not make it, no matter what rot order i use for the ped.

Expected behaviour
setElementRotation should have an Option to work the same way for everything.

Additional context
Maybe i oversee something here or maybe there is a custom conversion formula like "convertObjectToPedRotation" ?

@patrikjuvonen patrikjuvonen added the enhancement New feature or request label May 9, 2019
@javier2409
Copy link

could be related to this, maybe?
multitheftauto/mtasa-resources#150
I posted it as a resource bug, not mta bug, but I think we are talking about the same thing

@Einheit-101
Copy link
Author

Yes this is exactly whats happening for you

@javier2409
Copy link

You mentioned a conversion formula, well, there actually is one after all (found it after struggling with my issue all day yesterday), read the optional arguments for set/getElementRotation. It's not a conversion formula actually, but you can tell the functions to interpret the rotation as a certain type (ped/object/vehicle).

@qaisjp
Copy link
Contributor

qaisjp commented Mar 15, 2020

Sounds like an issue with gimbal locking. I don't think this is fixable, you'll have to use matrices.

@qaisjp qaisjp closed this as completed Mar 15, 2020
@qaisjp qaisjp added wontfix bug Something isn't working and removed enhancement New feature or request labels Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants