From ed1ba5093f6a9d10adb5da74580bcb4469159214 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Thu, 16 Sep 2021 12:37:24 -0700 Subject: Clarify RigidDynamicBody modes RigidDynamicBody modes are replaced with several properties to make their usage clearer: -lock_rotation: disable body's rotation (instead of MODE_LOCKED) -freeze: no gravity or forces (instead of MODE_STATIC and MODE_KINEMATIC) -freeze_mode: Static (can be only teleported) or Kinematic (can be animated) Also renamed MODE_DYNAMIC_LOCKED to MODE_DYNAMIC_LINEAR in the physics servers. --- servers/physics_3d/body_3d_sw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'servers/physics_3d') diff --git a/servers/physics_3d/body_3d_sw.cpp b/servers/physics_3d/body_3d_sw.cpp index 41745545d8..a8b19d7710 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(); -- cgit v1.2.3