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

Test, refactor and fix a bug in Basis.get_axis_angle #63428

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

fabriceci
Copy link
Contributor

@fabriceci fabriceci commented Jul 25, 2022

Follow up of #63190
Fix #63397
Fix #65179

I understand this code better now and I found where this code came from, there was a slight difference on the end of the algorithm, I used the original one, especially as it is used in many libraries such as three.js, it seems safer that way.

I cleaned up the code a bit and added some tests.

@fabriceci fabriceci added this to the 4.0 milestone Jul 25, 2022
@fabriceci fabriceci requested review from a team as code owners July 25, 2022 09:07
core/math/basis.cpp Outdated Show resolved Hide resolved
core/math/basis.cpp Outdated Show resolved Hide resolved
@fabriceci fabriceci force-pushed the fix-basis-get-axis-angle branch 8 times, most recently from 621a16f to 4f5e9df Compare July 25, 2022 20:46
@akien-mga akien-mga requested a review from aaronfranke July 27, 2022 09:25
@fabriceci fabriceci added cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Sep 3, 2022
core/math/basis.cpp Outdated Show resolved Hide resolved
core/math/basis.cpp Outdated Show resolved Hide resolved
@fabriceci fabriceci force-pushed the fix-basis-get-axis-angle branch from 4f5e9df to 3a41cba Compare September 14, 2022 09:56
@fabriceci fabriceci force-pushed the fix-basis-get-axis-angle branch from 3a41cba to 9f1a57d Compare September 14, 2022 10:05
@akien-mga akien-mga merged commit f2ba73f into godotengine:master Sep 15, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

This would require a manual backport for 3.x, it's not trivial to cherry-pick.

@akien-mga akien-mga removed cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Jan 26, 2023
akien-mga pushed a commit to JuanFdS/godot that referenced this pull request Jun 7, 2023
Backport of godotengine#63428.

Co-authored-by: juanFdS <juan9794@gmail.com>
akien-mga pushed a commit to akien-mga/godot that referenced this pull request Aug 18, 2023
Backport of godotengine#63428.

Co-authored-by: juanFdS <juan9794@gmail.com>

(cherry picked from commits 8245fd3
and d1c8c5d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kinematic body's transform origin is set to nan by move_and_slide Basis.toAxisAngle return NaN as angle
3 participants