Merge pull request #42113 from Calinou/deprecate-interpolatedcamera
Mark InterpolatedCamera as deprecated
This commit is contained in:
commit
2179c852da
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="InterpolatedCamera" inherits="Camera" version="3.2">
|
<class name="InterpolatedCamera" inherits="Camera" version="3.2">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
Camera which moves toward another node.
|
[i]Deprecated.[/i] Camera which moves toward another node.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
|
[i]Deprecated (will be removed in Godot 4.0).[/i] InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
|
||||||
If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
|
If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
|
|
|
@ -37,6 +37,8 @@ void InterpolatedCamera::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
|
|
||||||
|
WARN_DEPRECATED_MSG("InterpolatedCamera has been deprecated and will be removed in Godot 4.0.");
|
||||||
|
|
||||||
if (Engine::get_singleton()->is_editor_hint() && enabled)
|
if (Engine::get_singleton()->is_editor_hint() && enabled)
|
||||||
set_process_internal(false);
|
set_process_internal(false);
|
||||||
|
|
||||||
|
@ -131,6 +133,11 @@ real_t InterpolatedCamera::get_speed() const {
|
||||||
return speed;
|
return speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String InterpolatedCamera::get_configuration_warning() const {
|
||||||
|
|
||||||
|
return TTR("InterpolatedCamera has been deprecated and will be removed in Godot 4.0.");
|
||||||
|
}
|
||||||
|
|
||||||
void InterpolatedCamera::_bind_methods() {
|
void InterpolatedCamera::_bind_methods() {
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_target_path", "target_path"), &InterpolatedCamera::set_target_path);
|
ClassDB::bind_method(D_METHOD("set_target_path", "target_path"), &InterpolatedCamera::set_target_path);
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
void set_interpolation_enabled(bool p_enable);
|
void set_interpolation_enabled(bool p_enable);
|
||||||
bool is_interpolation_enabled() const;
|
bool is_interpolation_enabled() const;
|
||||||
|
|
||||||
|
String get_configuration_warning() const;
|
||||||
|
|
||||||
InterpolatedCamera();
|
InterpolatedCamera();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue