Skip to content

Conversation

julcst
Copy link

@julcst julcst commented Oct 1, 2025

Objective

Fixes #21316

Solution

Adds a new optional dependency on bevy_transform to bevy_math to use Transform::interpolate with easing

Testing

I did not test these changes


Copy link
Contributor

github-actions bot commented Oct 1, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@Jondolf
Copy link
Contributor

Jondolf commented Oct 1, 2025

I would much prefer if this was in bevy_transform and not in bevy_math. For the most part, bevy_math is intended to be purely a math and geometry focused standalone(-ish) crate with minimal dependence on the rest of Bevy. It would make more sense to have all the Transform functionality in bevy_transform instead of scattering it around several crates, especially when bevy_transform already depends on bevy_math

@Jondolf
Copy link
Contributor

Jondolf commented Oct 1, 2025

I believe bevy_transform would just need to enable the curve feature for bevy_math to make Ease available. We could either do this unconditionally, or put it behind some ease feature in bevy_transform

@hukasu hukasu added A-Transform Translations, rotations and scales A-Math Fundamental domain-agnostic mathematical operations X-Controversial There is active debate or serious implications around merging this PR M-Needs-Release-Note Work that should be called out in the blog due to impact S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Oct 1, 2025
Copy link
Contributor

github-actions bot commented Oct 1, 2025

It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note.

Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes.

@alice-i-cecile
Copy link
Member

I would much prefer if this was in bevy_transform and not in bevy_math

Seconded!

We could either do this unconditionally, or put it behind some ease feature in bevy_transform

I'd prefer a simple ease or animation feature.

We should also do this for the other transform types if we're doing this.

@alice-i-cecile alice-i-cecile added the A-Animation Make things move and change over time label Oct 1, 2025
@julcst
Copy link
Author

julcst commented Oct 2, 2025

One could also extract the interpolate function into a trait Interpolatable and implement Ease for Interpolatable, right?

@alice-i-cecile
Copy link
Member

Yep, but we should only do that in a separate PR.

@julcst julcst closed this Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time A-Math Fundamental domain-agnostic mathematical operations A-Transform Translations, rotations and scales M-Needs-Release-Note Work that should be called out in the blog due to impact S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged X-Controversial There is active debate or serious implications around merging this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Ease to Transform
4 participants