summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorSilc Renew <tokage.it.lab@gmail.com>2022-08-26 11:42:00 +0900
committerSilc Renew <tokage.it.lab@gmail.com>2022-08-27 07:58:22 +0900
commit931fb4dc11509357297bcdcc6a8d6b11638ff585 (patch)
treecd078a938be475cc20bba35ac856103b9e524239 /doc/classes
parent4808d01b2bcda54db15e1e2649e0a38c37886ee1 (diff)
Add linear/cubic angle interpolation to Animation interpolation type
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml26
-rw-r--r--doc/classes/Animation.xml8
2 files changed, 34 insertions, 0 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 59d6f878a9..71579d5173 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -260,6 +260,32 @@
Cubic interpolates between two values by the factor defined in [param weight] with pre and post values.
</description>
</method>
+ <method name="cubic_interpolate_angle">
+ <return type="float" />
+ <param index="0" name="from" type="float" />
+ <param index="1" name="to" type="float" />
+ <param index="2" name="pre" type="float" />
+ <param index="3" name="post" type="float" />
+ <param index="4" name="weight" type="float" />
+ <description>
+ Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with pre and post values. See also [method lerp_angle].
+ </description>
+ </method>
+ <method name="cubic_interpolate_angle_in_time">
+ <return type="float" />
+ <param index="0" name="from" type="float" />
+ <param index="1" name="to" type="float" />
+ <param index="2" name="pre" type="float" />
+ <param index="3" name="post" type="float" />
+ <param index="4" name="weight" type="float" />
+ <param index="5" name="to_t" type="float" />
+ <param index="6" name="pre_t" type="float" />
+ <param index="7" name="post_t" type="float" />
+ <description>
+ Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with pre and post values. See also [method lerp_angle].
+ It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ </description>
+ </method>
<method name="cubic_interpolate_in_time">
<return type="float" />
<param index="0" name="from" type="float" />
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 8b97fda4d3..df0fb11ac7 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -600,6 +600,14 @@
<constant name="INTERPOLATION_CUBIC" value="2" enum="InterpolationType">
Cubic interpolation.
</constant>
+ <constant name="INTERPOLATION_LINEAR_ANGLE" value="3" enum="InterpolationType">
+ Linear interpolation with shortest path rotation.
+ [b]Note:[/b] The result value is always normalized and may not match the key value.
+ </constant>
+ <constant name="INTERPOLATION_CUBIC_ANGLE" value="4" enum="InterpolationType">
+ Cubic interpolation with shortest path rotation.
+ [b]Note:[/b] The result value is always normalized and may not match the key value.
+ </constant>
<constant name="UPDATE_CONTINUOUS" value="0" enum="UpdateMode">
Update between keyframes.
</constant>