summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-27 08:37:39 +0100
committerGitHub <noreply@github.com>2022-01-27 08:37:39 +0100
commit74653062d5fa436ce2c716567a7fffd21e08377c (patch)
treeb4fe2c5931f98f26b67c91ac8f5036ec8112971b
parent2c7ff931dfacb72df446473b3e74fb61c472bf36 (diff)
parent5deb5ebf2365d23c8228df252a30f444d5c3f20b (diff)
Merge pull request #57291 from mhilbrunner/expose-transform3d-slerp
Expose Transform3D::sphere_interpolate_with()
-rw-r--r--core/variant/variant_call.cpp1
-rw-r--r--doc/classes/Transform3D.xml8
2 files changed, 9 insertions, 0 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 8dd48a4c28..289aac79b8 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1789,6 +1789,7 @@ static void _register_variant_builtin_methods() {
bind_method(Transform3D, scaled, sarray("scale"), varray());
bind_method(Transform3D, translated, sarray("offset"), varray());
bind_method(Transform3D, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0)));
+ bind_method(Transform3D, sphere_interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, is_equal_approx, sarray("xform"), varray());
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index e679a8cfeb..ccecaaa6ac 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -106,6 +106,14 @@
Scales basis and origin of the transform by the given scale factor, using matrix multiplication.
</description>
</method>
+ <method name="sphere_interpolate_with" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="xform" type="Transform3D" />
+ <argument index="1" name="weight" type="float" />
+ <description>
+ Returns a transform spherically interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
+ </description>
+ </method>
<method name="translated" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="offset" type="Vector3" />