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

Godot uses JPL style quaternions instead of Hamilton #6271

Closed
fire opened this issue Oct 6, 2022 · 3 comments · Fixed by godotengine/godot#87181
Closed

Godot uses JPL style quaternions instead of Hamilton #6271

fire opened this issue Oct 6, 2022 · 3 comments · Fixed by godotengine/godot#87181
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement

Comments

@fire
Copy link
Member

fire commented Oct 6, 2022

Your Godot version:
godotengine/godot@0c23a2c

Issue description:

Software Quaternion convention
Godot Engine JPL
Blender ?
ISO 8855:2011 ?
Unreal Engine ?
Unity ?
Three.js ?
Eigen ?

Godot uses JPL style quaternions instead of Hamilton. We should add a note somewhere so people don't get frustrated why their math doesn't work.

https://fzheng.me/2017/11/12/quaternion_conventions_en/

https://arxiv.org/abs/1801.07478

This is a report so it doesn't get lost.

The math for conversion from JPL or Hamilton is take x,y,z,w where x,y,z is the axis and multiply the axis by -1. W is the scalar like 1.

URL to the documentation page:
Not that familiar.

@fire fire added the bug label Oct 6, 2022
@Calinou Calinou added enhancement and removed bug labels Oct 6, 2022
@skyace65 skyace65 added the area:manual Issues and PRs related to the Manual/Tutorials section of the documentation label Dec 29, 2022
@YuriSizov
Copy link
Contributor

Where should we add such a note?

@fire
Copy link
Member Author

fire commented Feb 4, 2023

When I last asked GDQuest our residential uiux person, he said that most people don't read the docs, and that putting it in the tooltips of Quaternion is probably the most usable place. If that doesn't work at least in the help browser xml.

@fire
Copy link
Member Author

fire commented Apr 15, 2023

aaronfranke — Today at 09:44
iFire I just checked in Blender using its Python scripting https://docs.blender.org/api/current/mathutils.html
The Quaternion type follows the rule ij = k and ijk = -1 so it's Hamilton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants