diff options
author | Camille Mohr-Daurat <pouleyKetchoup@gmail.com> | 2021-09-28 17:11:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 17:11:17 -0700 |
commit | 341b532d5e7ac10fa1e8006e0a994f55cb027bb8 (patch) | |
tree | add588d90d472e99eff712f4f20cc3dc2e3c316f /servers | |
parent | f72419d1525f2e5fe08f81a8fe06af3831c71c3e (diff) | |
parent | ed1ba5093f6a9d10adb5da74580bcb4469159214 (diff) |
Merge pull request #52754 from nekomatata/dynamic-body-modes
Clarify RigidDynamicBody modes
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_2d/body_2d_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics_3d/body_3d_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics_server_2d.cpp | 2 | ||||
-rw-r--r-- | servers/physics_server_2d.h | 2 | ||||
-rw-r--r-- | servers/physics_server_3d.cpp | 2 | ||||
-rw-r--r-- | servers/physics_server_3d.h | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index edd769aa9a..38b98b7bca 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -113,7 +113,7 @@ void Body2DSW::update_mass_properties() { _inv_inertia = 0; _inv_mass = 0; } break; - case PhysicsServer2D::BODY_MODE_DYNAMIC_LOCKED: { + case PhysicsServer2D::BODY_MODE_DYNAMIC_LINEAR: { _inv_inertia = 0; _inv_mass = 1.0 / mass; @@ -257,7 +257,7 @@ void Body2DSW::set_mode(PhysicsServer2D::BodyMode p_mode) { set_active(true); } break; - case PhysicsServer2D::BODY_MODE_DYNAMIC_LOCKED: { + case PhysicsServer2D::BODY_MODE_DYNAMIC_LINEAR: { _inv_mass = mass > 0 ? (1.0 / mass) : 0; _inv_inertia = 0; angular_velocity = 0; diff --git a/servers/physics_3d/body_3d_sw.cpp b/servers/physics_3d/body_3d_sw.cpp index 5924e249a5..91fe80a3dc 100644 --- a/servers/physics_3d/body_3d_sw.cpp +++ b/servers/physics_3d/body_3d_sw.cpp @@ -154,7 +154,7 @@ void Body3DSW::update_mass_properties() { _inv_inertia = Vector3(); _inv_mass = 0; } break; - case PhysicsServer3D::BODY_MODE_DYNAMIC_LOCKED: { + case PhysicsServer3D::BODY_MODE_DYNAMIC_LINEAR: { _inv_inertia_tensor.set_zero(); _inv_mass = 1.0 / mass; @@ -310,7 +310,7 @@ void Body3DSW::set_mode(PhysicsServer3D::BodyMode p_mode) { set_active(true); } break; - case PhysicsServer3D::BODY_MODE_DYNAMIC_LOCKED: { + case PhysicsServer3D::BODY_MODE_DYNAMIC_LINEAR: { _inv_mass = mass > 0 ? (1.0 / mass) : 0; _inv_inertia = Vector3(); angular_velocity = Vector3(); diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index b94245a2d1..3fc94cd727 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -699,7 +699,7 @@ void PhysicsServer2D::_bind_methods() { BIND_ENUM_CONSTANT(BODY_MODE_STATIC); BIND_ENUM_CONSTANT(BODY_MODE_KINEMATIC); BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC); - BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LOCKED); + BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LINEAR); BIND_ENUM_CONSTANT(BODY_PARAM_BOUNCE); BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION); diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h index 9a9ba2103d..4b85382fe5 100644 --- a/servers/physics_server_2d.h +++ b/servers/physics_server_2d.h @@ -349,7 +349,7 @@ public: BODY_MODE_STATIC, BODY_MODE_KINEMATIC, BODY_MODE_DYNAMIC, - BODY_MODE_DYNAMIC_LOCKED, + BODY_MODE_DYNAMIC_LINEAR, }; virtual RID body_create() = 0; diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index e61f1088f5..9384cdc7b8 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -834,7 +834,7 @@ void PhysicsServer3D::_bind_methods() { BIND_ENUM_CONSTANT(BODY_MODE_STATIC); BIND_ENUM_CONSTANT(BODY_MODE_KINEMATIC); BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC); - BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LOCKED); + BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LINEAR); BIND_ENUM_CONSTANT(BODY_PARAM_BOUNCE); BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION); diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index e43a59ec93..14d395e714 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -360,7 +360,7 @@ public: BODY_MODE_STATIC, BODY_MODE_KINEMATIC, BODY_MODE_DYNAMIC, - BODY_MODE_DYNAMIC_LOCKED, + BODY_MODE_DYNAMIC_LINEAR, }; virtual RID body_create() = 0; |