1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

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.
This commit is contained in:
PouleyKetchoupp
2021-09-16 12:37:24 -07:00
parent 3581b893ed
commit ed1ba5093f
19 changed files with 234 additions and 154 deletions

View File

@@ -779,7 +779,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);