-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix Curve3D baking up vectors for nontrivial curves. #81885
Conversation
Is there a better macro to test for vectors being nearly equal? CHECK_EQ is nice because it shows the precise values that are incorrect, but it's inappropriate for precise floating checks. |
The bug is also present in 4.1, should be safe for cherry-picking? 🤔 |
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.
Sorry, the my code got confused when I was testing. This fix is probably fine, but we should fix the comment in Line 1656:
Basis frame; // X-right, Y-up, Z-forward.
to
Basis frame; // X-right, Y-up, -Z-forward.
9076147
to
35add14
Compare
The code was modified in 42aa539 to have a different basis vector, but this line was missed and caused up vectors to invert sometimes. Fixes godotengine#81879
35add14
to
734b9d2
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.
As this bug got popular on Twitter, I'll clarify that even though this will be merged in a bit, it won't make the cut for 4.2-dev5 which was built yesterday (even though we'll release it today).
It should be in 4.2-dev6 and likely 4.1.2 RC 1.
Thanks! And congrats for your first merged Godot contribution 🎉 |
Cherry-picked for 4.1.2. |
The code was modified in 42aa539 to have a different basis vector, but this line was missed and caused up vectors to invert sometimes.
Fixes #81879
One-character bugfix by @kleonc, bisection and test case by me.