Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 30, 2025

Description

The extension adds Quaternion functionality to GDevelop. This avoids Euler angles by first converting to Quaternions. Issues like gimbal lock and order of rotations can mostly be ignored with quaternions. Any 3d rotations generally need quaternions and in future it will have slerp functionality, allowing interpolated rotations that are different to Euler interpolation. Made by InkedToast

How to use the extension

  • Convert Euler ZYX to Quaternion WXYZ
  • Convert Quaternion to Euler (The numbers may look different like a euler 100 100 100 will become -80 80 -80 after converting and then converting back as quaternions have multiple solutions, but the angle will still be the same)
  • Multiply Quaternion1 by Quaternion2
  • Quaternion Inverse
  • Quaternion normalisation (to make length 1)

All functions store values in Struct variables with children W X Y Z. In future the above will also be accessable through expressions. To use effectively convert Euler angles to Quaternion and apply rotations through Quaternion multiplication. Next keep rotations stored as Quaternions and apply by first normalising and then converting back to euler. To reverse a rotation, multiply by the inverse Quaternion.
Enjoy.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

Example file

QuaternionExample.zip

Extension file

Quaternions.zip


Extension by @MooseMakesGames

You can update the extension on this "Pull Request" by commenting the update command: in the comment field, type !update, then drag and drop a zip file with your extension file in the commenting field, like how you initially submitted the extension. It should look like this:

!update [MyExtension.zip](https://github.com/GDevelopApp/GDevelop-extensions/files/12709661/MyExtension.zip)

It can take a few seconds for the file to fully upload and show as the above. Once it is like shown above, click "Comment" and let the bot do the rest!

@github-actions github-actions bot added the ✨ New extension A new extension label Nov 30, 2025
@github-actions github-actions bot requested a review from a team as a code owner November 30, 2025 07:22
@github-actions github-actions bot added the ✨ New extension A new extension label Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ New extension A new extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants