1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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).
This commit is contained in:
PouleyKetchoupp
2020-04-14 19:59:53 +02:00
parent 24fdedfe94
commit daf7dcac7a
20 changed files with 382 additions and 127 deletions

View File

@@ -863,10 +863,15 @@ void PhysicsServer3D::_bind_methods() {
BIND_ENUM_CONSTANT(BODY_PARAM_INERTIA);
BIND_ENUM_CONSTANT(BODY_PARAM_CENTER_OF_MASS);
BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP_MODE);
BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP_MODE);
BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP);
BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
BIND_ENUM_CONSTANT(BODY_PARAM_MAX);
BIND_ENUM_CONSTANT(BODY_DAMP_MODE_COMBINE);
BIND_ENUM_CONSTANT(BODY_DAMP_MODE_REPLACE);
BIND_ENUM_CONSTANT(BODY_STATE_TRANSFORM);
BIND_ENUM_CONSTANT(BODY_STATE_LINEAR_VELOCITY);
BIND_ENUM_CONSTANT(BODY_STATE_ANGULAR_VELOCITY);