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

Fix slurp not always taking shortest path #153

Merged
merged 2 commits into from
Dec 27, 2022
Merged

Conversation

G0BL1N
Copy link
Contributor

@G0BL1N G0BL1N commented Dec 24, 2022

Fixes issue #152. As discussed in this issue and explained here, most 3d engines (and model exporters) expect slerp between two quaternions (rotors in this case) to always take shortest path, despite dot product's sign.
Fixes an issue when interpolating between keyframes of animated models.

Copy link
Owner

@fu5ha fu5ha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :) Minor change requested..

src/interp.rs Outdated Show resolved Hide resolved
src/interp.rs Outdated Show resolved Hide resolved
Right, Rotor3 is Copy, didn't think about that

Co-authored-by: Gray Olson <gray@grayolson.com>
@G0BL1N G0BL1N requested a review from fu5ha December 26, 2022 22:41
@G0BL1N
Copy link
Contributor Author

G0BL1N commented Dec 26, 2022

Sure, that definitely looks better

@fu5ha fu5ha merged commit 045ed5e into fu5ha:main Dec 27, 2022
@G0BL1N G0BL1N deleted the slerp-path-fix branch December 27, 2022 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants