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

Add support for Transform2D/3D in lerp() #96496

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented Sep 2, 2024

@aXu-AP aXu-AP requested a review from a team as a code owner September 2, 2024 21:16
@Mickeon
Copy link
Contributor

Mickeon commented Sep 2, 2024

The supported types are listed in the description so that should be updated as well.

@fire fire requested review from fire and TokageItLab September 3, 2024 02:28
@fire
Copy link
Member

fire commented Sep 3, 2024

@lyuma @TokageItLab Transform2D and Transform3D lerps are not really lerps anymore since it's a composite of lerp position, lerp scale and slerp rotation, but from a usability point of view I have nothing blocking it.

👍

@fire fire requested a review from a team September 3, 2024 02:30
@AThousandShips AThousandShips added this to the 4.x milestone Sep 3, 2024
@aXu-AP aXu-AP requested a review from a team as a code owner September 3, 2024 11:52
@aXu-AP
Copy link
Contributor Author

aXu-AP commented Sep 3, 2024

Transform2D and Transform3D lerps are not really lerps anymore since it's a composite

Well, lerp of Vector3 is also a composite of lerp of 3 floats and slerp is a different story altogether so I think transform interpolation goes well in to the mix...
If the user calls lerp(transform), there's no mistaking what the user intents to do.

I now changed the description as well. Also fixed a small factual error in the description (instead of clamping the output, weight should be clamped, since not all output types can be clamped).

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

Your arguments to add Transform2d and Transforms3d makes sense for usability.

@akien-mga akien-mga changed the title Add support for Transform2D/3D in lerp() Add support for Transform2D/3D in lerp() Sep 4, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 5, 2024
@akien-mga akien-mga merged commit 4629f7d into godotengine:master Sep 5, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

5 participants