Closed TheYellowArchitect closed 2 months ago
Given that lerp(Variant, Variant)
already performs Basis.slerp
/ Quaternion.slerp
(which could be argued to be non-trivial linear interpolations) I see no reason for it to not perform Transform2D.interpolate_with
/ Transform3D.interpolate_with
as well.
So I'd say feel free to open a PR whoever wants to tackle it. Here's relevant source.
Implemented by https://github.com/godotengine/godot/pull/96496.
Describe the project you are working on
Online action game with rollback
Describe the problem or limitation you are having in your project
It doesn't work with
Transform3D
andTransform2D
. ButTransform2D
andTransform3D
have the following lerp functions which should be invoked for their type:https://docs.godotengine.org/en/stable/classes/class_transform3d.html#class-transform3d-method-interpolate-with
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It fills a minor oversight of the Variant types valid for this function.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
lerp also includes
Transform2D
andTransform3D
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, by writing your own singleton lerp wrapper class. Not important really, but would make the code cleaner by cutting off 1 class.
Is there a reason why this should be core and not an add-on in the asset library?
it expands an existing engine function