diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-26 13:45:07 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-26 13:45:07 +0200 |
commit | eefe161549d146e4b9783269b42ec3540f498e1f (patch) | |
tree | 2ff1f307ce25ba406142619d26802d3d7e2b093e /servers/physics_server_2d.cpp | |
parent | 93cf990cdb6309edd9d2be4849d07ec1bf763650 (diff) | |
parent | 0fcfb07246dda4412eebf42394a9d0a30081bb16 (diff) | |
download | redot-engine-eefe161549d146e4b9783269b42ec3540f498e1f.tar.gz |
Merge pull request #81610 from Ughuuu/add-angle-limits-and-motor-to-pin-joint-2d
Update PinJoint2D API with angle limits and motor speed
Diffstat (limited to 'servers/physics_server_2d.cpp')
-rw-r--r-- | servers/physics_server_2d.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index a5fa5291c0..aea0c52a63 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -776,6 +776,9 @@ void PhysicsServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("joint_make_groove", "joint", "groove1_a", "groove2_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::joint_make_groove, DEFVAL(RID()), DEFVAL(RID())); ClassDB::bind_method(D_METHOD("joint_make_damped_spring", "joint", "anchor_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::joint_make_damped_spring, DEFVAL(RID())); + ClassDB::bind_method(D_METHOD("pin_joint_set_flag", "joint", "flag", "enabled"), &PhysicsServer2D::pin_joint_set_flag); + ClassDB::bind_method(D_METHOD("pin_joint_get_flag", "joint", "flag"), &PhysicsServer2D::pin_joint_get_flag); + ClassDB::bind_method(D_METHOD("pin_joint_set_param", "joint", "param", "value"), &PhysicsServer2D::pin_joint_set_param); ClassDB::bind_method(D_METHOD("pin_joint_get_param", "joint", "param"), &PhysicsServer2D::pin_joint_get_param); @@ -863,6 +866,12 @@ void PhysicsServer2D::_bind_methods() { BIND_ENUM_CONSTANT(JOINT_PARAM_MAX_FORCE); BIND_ENUM_CONSTANT(PIN_JOINT_SOFTNESS); + BIND_ENUM_CONSTANT(PIN_JOINT_LIMIT_UPPER); + BIND_ENUM_CONSTANT(PIN_JOINT_LIMIT_LOWER); + BIND_ENUM_CONSTANT(PIN_JOINT_MOTOR_TARGET_VELOCITY); + + BIND_ENUM_CONSTANT(PIN_JOINT_FLAG_ANGULAR_LIMIT_ENABLED); + BIND_ENUM_CONSTANT(PIN_JOINT_FLAG_MOTOR_ENABLED); BIND_ENUM_CONSTANT(DAMPED_SPRING_REST_LENGTH); BIND_ENUM_CONSTANT(DAMPED_SPRING_STIFFNESS); |