-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
C#: Fix Vector3 Slerp
normalization error
#94766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing to the .NET module! The changes look good to me, just a minor nit-pick.
Ported the existing zero length check in C++ into C#.
9debbb0
to
0d6e9de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
Slerp
normalization error
Thanks! And congrats for your first merged Godot contribution 🎉 |
I know it's already merged but I just wanted to comment that I also approve of this ✅ |
Cherry-picked for 4.3.1. |
Closes #94049 by adding a check of the rotation axis being the zero vector, and linearly interpolating if so.
The check already exists in the C++ implementation of Slerp, so this PR ports it to C#:
godot/core/math/vector3.h
Lines 238 to 257 in e343dbb
Sample problematic C# code I used for testing:
Console output (previously, it would crash on any of the print statements):