parent
f3864ec89f
commit
5b2100d85c
@ -1350,6 +1350,9 @@ void Tween::interpolate_property(Object *p_object, NodePath p_property, Variant
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that the target object is valid
|
||||||
|
ERR_FAIL_COND_MSG(p_object == nullptr, vformat("The Tween \"%s\"'s target node is `null`. Is the node reference correct?", get_name()));
|
||||||
|
|
||||||
// Get the property from the node path
|
// Get the property from the node path
|
||||||
p_property = p_property.get_as_property_path();
|
p_property = p_property.get_as_property_path();
|
||||||
|
|
||||||
@ -1378,6 +1381,9 @@ void Tween::interpolate_method(Object *p_object, StringName p_method, Variant p_
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that the target object is valid
|
||||||
|
ERR_FAIL_COND_MSG(p_object == nullptr, vformat("The Tween \"%s\"'s target node is `null`. Is the node reference correct?", get_name()));
|
||||||
|
|
||||||
// Convert any integers into REALs as they are better for interpolation
|
// Convert any integers into REALs as they are better for interpolation
|
||||||
if (p_initial_val.get_type() == Variant::INT) {
|
if (p_initial_val.get_type() == Variant::INT) {
|
||||||
p_initial_val = p_initial_val.operator real_t();
|
p_initial_val = p_initial_val.operator real_t();
|
||||||
|
Loading…
Reference in New Issue
Block a user