ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.33k stars 526 forks source link

[Feature] `QuatStruct` missing `ToAngles(Quat from)` function #2611

Closed nashmuhandes closed 5 days ago

nashmuhandes commented 5 days ago

GZDoom version

No response

Which game are you running with GZDoom?

None

What Operating System are you using?

None

If Other OS, please describe

No response

Relevant hardware info

No response

Is your feature request related to a problem? Please describe.

A built-in function to get Angle, Pitch and Roll value from a quat.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Add any other context or screenshots about the feature request here.

No response

FishyClock commented 5 days ago

Just for reference this is how gutamatics does it https://gitlab.com/Gutawer/gzdoom-gutamatics/-/blob/master/Gutamatics/Quaternion.zsc?ref_type=heads#L72-101

Gutawer commented 5 days ago

this was left out on purpose for reasons about gimbal lock at the pitch extremities and how that affects gzdoom’s euler angle interpolation, i’d recommend still keeping it out on purpose. people who really want to can implements this function inside zscript. id recommend keeping it this way

regardless please absolutely do not just copy this from gutamatics, im not sure at all of that codes quality

FishyClock commented 5 days ago

Understood