diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index 9e9f7717434..dea2ccf254d 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -29,6 +29,15 @@ + + + + + + + This method is deprecated. Please use [method apply_torque_impulse] instead. + + diff --git a/modules/mono/doc_classes/@C#.xml b/modules/mono/doc_classes/@C#.xml index 0f33c76eb26..4897ab2b24d 100644 --- a/modules/mono/doc_classes/@C#.xml +++ b/modules/mono/doc_classes/@C#.xml @@ -1,5 +1,5 @@ - + diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml index 3efe71f1b36..6ada704695a 100644 --- a/modules/mono/doc_classes/CSharpScript.xml +++ b/modules/mono/doc_classes/CSharpScript.xml @@ -1,5 +1,5 @@ - + diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml index 1e5edf2a2a2..c79227dcfc0 100644 --- a/modules/mono/doc_classes/GodotSharp.xml +++ b/modules/mono/doc_classes/GodotSharp.xml @@ -1,5 +1,5 @@ - + diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index d954230d23d..84ebc4b2e54 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -94,6 +94,8 @@ void PhysicsDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &PhysicsDirectBodyState::add_force); ClassDB::bind_method(D_METHOD("apply_impulse", "position", "j"), &PhysicsDirectBodyState::apply_impulse); + // This typo made it into 3.0.1. We'll leave it in until 3.1 + ClassDB::bind_method(D_METHOD("apply_torqe_impulse", "j"), &PhysicsDirectBodyState::_apply_torqe_impulse_deprecated); ClassDB::bind_method(D_METHOD("apply_torque_impulse", "j"), &PhysicsDirectBodyState::apply_torque_impulse); ClassDB::bind_method(D_METHOD("set_sleep_state", "enabled"), &PhysicsDirectBodyState::set_sleep_state); diff --git a/servers/physics_server.h b/servers/physics_server.h index 94fc8d479dd..520a37698e8 100644 --- a/servers/physics_server.h +++ b/servers/physics_server.h @@ -65,6 +65,13 @@ public: virtual void add_force(const Vector3 &p_force, const Vector3 &p_pos) = 0; virtual void apply_impulse(const Vector3 &p_pos, const Vector3 &p_j) = 0; + + void _apply_torqe_impulse_deprecated(const Vector3 &p_j) { + WARN_PRINT("This method is deprecated and will be removed in 3.1. Use `apply_torque_impulse` instead."); + + apply_torque_impulse(p_j); + } + virtual void apply_torque_impulse(const Vector3 &p_j) = 0; virtual void set_sleep_state(bool p_enable) = 0;