diff options
author | Dragos Daian <daian.dragos@yahoo.com> | 2023-09-13 13:45:24 +0200 |
---|---|---|
committer | Dragos Daian <daian.dragos@yahoo.com> | 2023-09-26 10:29:23 +0200 |
commit | 0fcfb07246dda4412eebf42394a9d0a30081bb16 (patch) | |
tree | 131b31432d7b21606bbf0d4ab2b8fb8caf4360ba /servers/physics_server_2d.cpp | |
parent | c12d63556b5c1da03a00dd4c45c40e60bd8d68c2 (diff) | |
download | redot-engine-0fcfb07246dda4412eebf42394a9d0a30081bb16.tar.gz |
Update PinJoint2D API with angle limits and motor speed
add enabled methods for motor and angular limits
use correct name to get joint
update copyright
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); |