Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix LookatModifier3D.is_interpolating() value is inverted

Silc Lizard (Tokage) Renewa52e4c672d14
diff --git a/doc/classes/LookAtModifier3D.xml b/doc/classes/LookAtModifier3D.xml
index b28a5e833f7..8612ddce02d 100644
--- a/doc/classes/LookAtModifier3D.xml
+++ b/doc/classes/LookAtModifier3D.xml
@@ -19,7 +19,7 @@
<method name="is_interpolating" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if time-based interpolation is running. If [code]true[/code], it is equivalent to [method get_interpolation_remaining] returning [code]0.0[/code].
+ Returns [code]true[/code] if time-based interpolation is running. If [code]false[/code], it is equivalent to [method get_interpolation_remaining] returning [code]0.0[/code].
This is useful to determine whether a [LookAtModifier3D] can be removed safely.
</description>
</method>
diff --git a/scene/3d/look_at_modifier_3d.cpp b/scene/3d/look_at_modifier_3d.cpp
index 7f98990ef3b..550539d2629 100644
--- a/scene/3d/look_at_modifier_3d.cpp
+++ b/scene/3d/look_at_modifier_3d.cpp
@@ -393,7 +393,7 @@ float LookAtModifier3D::get_interpolation_remaining() const {
}
bool LookAtModifier3D::is_interpolating() const {
- return Math::is_zero_approx(remaining);
+ return !Math::is_zero_approx(remaining);
}
// General API.