diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2020-04-14 19:59:53 +0200 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-10-25 18:22:12 -0700 |
commit | daf7dcac7a9e0b4c26ba62ba9a700813d5abec9a (patch) | |
tree | 3ab364852f8804d03e8f6334a792d18f523dfea3 /servers/physics_server_3d.h | |
parent | 24fdedfe948a918b5a67846f7962f83ba0e59258 (diff) | |
download | redot-engine-daf7dcac7a9e0b4c26ba62ba9a700813d5abec9a.tar.gz |
Improved RigidDynamicBody linear/angular damping override
Damping values are now non-negative.
Add new properties linear_damp_mode and angular_damp_mode to set the way
RigidDynamicBody and PhysicalBone (2D & 3D) use damping values.
It can now be Combine (default) to add to the default/areas, or Replace
to override the value completely (current behavior).
Diffstat (limited to 'servers/physics_server_3d.h')
-rw-r--r-- | servers/physics_server_3d.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index 6f55e287c9..79369bd459 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -364,6 +364,11 @@ public: BODY_MODE_DYNAMIC_LINEAR, }; + enum BodyDampMode { + BODY_DAMP_MODE_COMBINE, + BODY_DAMP_MODE_REPLACE, + }; + virtual RID body_create() = 0; virtual void body_set_space(RID p_body, RID p_space) = 0; @@ -408,6 +413,8 @@ public: BODY_PARAM_INERTIA, BODY_PARAM_CENTER_OF_MASS, BODY_PARAM_GRAVITY_SCALE, + BODY_PARAM_LINEAR_DAMP_MODE, + BODY_PARAM_ANGULAR_DAMP_MODE, BODY_PARAM_LINEAR_DAMP, BODY_PARAM_ANGULAR_DAMP, BODY_PARAM_MAX, @@ -890,6 +897,7 @@ VARIANT_ENUM_CAST(PhysicsServer3D::AreaParameter); VARIANT_ENUM_CAST(PhysicsServer3D::AreaSpaceOverrideMode); VARIANT_ENUM_CAST(PhysicsServer3D::BodyMode); VARIANT_ENUM_CAST(PhysicsServer3D::BodyParameter); +VARIANT_ENUM_CAST(PhysicsServer3D::BodyDampMode); VARIANT_ENUM_CAST(PhysicsServer3D::BodyState); VARIANT_ENUM_CAST(PhysicsServer3D::BodyAxis); VARIANT_ENUM_CAST(PhysicsServer3D::PinJointParam); |