|
@@ -221,6 +221,8 @@ void Joint3D::_bind_methods() {
|
|
ClassDB::bind_method(D_METHOD("set_exclude_nodes_from_collision", "enable"), &Joint3D::set_exclude_nodes_from_collision);
|
|
ClassDB::bind_method(D_METHOD("set_exclude_nodes_from_collision", "enable"), &Joint3D::set_exclude_nodes_from_collision);
|
|
ClassDB::bind_method(D_METHOD("get_exclude_nodes_from_collision"), &Joint3D::get_exclude_nodes_from_collision);
|
|
ClassDB::bind_method(D_METHOD("get_exclude_nodes_from_collision"), &Joint3D::get_exclude_nodes_from_collision);
|
|
|
|
|
|
|
|
+ ClassDB::bind_method(D_METHOD("get_rid"), &Joint3D::get_rid);
|
|
|
|
+
|
|
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_a", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "PhysicsBody3D"), "set_node_a", "get_node_a");
|
|
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_a", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "PhysicsBody3D"), "set_node_a", "get_node_a");
|
|
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_b", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "PhysicsBody3D"), "set_node_b", "get_node_b");
|
|
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_b", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "PhysicsBody3D"), "set_node_b", "get_node_b");
|
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "solver_priority", PROPERTY_HINT_RANGE, "1,8,1"), "set_solver_priority", "get_solver_priority");
|
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "solver_priority", PROPERTY_HINT_RANGE, "1,8,1"), "set_solver_priority", "get_solver_priority");
|
|
@@ -257,7 +259,7 @@ void PinJoint3D::set_param(Param p_param, real_t p_value) {
|
|
ERR_FAIL_INDEX(p_param, 3);
|
|
ERR_FAIL_INDEX(p_param, 3);
|
|
params[p_param] = p_value;
|
|
params[p_param] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->pin_joint_set_param(get_joint(), PhysicsServer3D::PinJointParam(p_param), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->pin_joint_set_param(get_rid(), PhysicsServer3D::PinJointParam(p_param), p_value);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -332,7 +334,7 @@ void HingeJoint3D::set_param(Param p_param, real_t p_value) {
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
params[p_param] = p_value;
|
|
params[p_param] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->hinge_joint_set_param(get_joint(), PhysicsServer3D::HingeJointParam(p_param), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->hinge_joint_set_param(get_rid(), PhysicsServer3D::HingeJointParam(p_param), p_value);
|
|
}
|
|
}
|
|
|
|
|
|
update_gizmos();
|
|
update_gizmos();
|
|
@@ -347,7 +349,7 @@ void HingeJoint3D::set_flag(Flag p_flag, bool p_value) {
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
flags[p_flag] = p_value;
|
|
flags[p_flag] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->hinge_joint_set_flag(get_joint(), PhysicsServer3D::HingeJointFlag(p_flag), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->hinge_joint_set_flag(get_rid(), PhysicsServer3D::HingeJointFlag(p_flag), p_value);
|
|
}
|
|
}
|
|
|
|
|
|
update_gizmos();
|
|
update_gizmos();
|
|
@@ -458,7 +460,7 @@ void SliderJoint3D::set_param(Param p_param, real_t p_value) {
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
params[p_param] = p_value;
|
|
params[p_param] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->slider_joint_set_param(get_joint(), PhysicsServer3D::SliderJointParam(p_param), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->slider_joint_set_param(get_rid(), PhysicsServer3D::SliderJointParam(p_param), p_value);
|
|
}
|
|
}
|
|
update_gizmos();
|
|
update_gizmos();
|
|
}
|
|
}
|
|
@@ -540,7 +542,7 @@ void ConeTwistJoint3D::set_param(Param p_param, real_t p_value) {
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
params[p_param] = p_value;
|
|
params[p_param] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->cone_twist_joint_set_param(get_joint(), PhysicsServer3D::ConeTwistJointParam(p_param), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->cone_twist_joint_set_param(get_rid(), PhysicsServer3D::ConeTwistJointParam(p_param), p_value);
|
|
}
|
|
}
|
|
|
|
|
|
update_gizmos();
|
|
update_gizmos();
|
|
@@ -753,7 +755,7 @@ void Generic6DOFJoint3D::set_param_x(Param p_param, real_t p_value) {
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
params_x[p_param] = p_value;
|
|
params_x[p_param] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_rid(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
|
|
}
|
|
}
|
|
|
|
|
|
update_gizmos();
|
|
update_gizmos();
|
|
@@ -768,7 +770,7 @@ void Generic6DOFJoint3D::set_param_y(Param p_param, real_t p_value) {
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
params_y[p_param] = p_value;
|
|
params_y[p_param] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_rid(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
|
|
}
|
|
}
|
|
update_gizmos();
|
|
update_gizmos();
|
|
}
|
|
}
|
|
@@ -782,7 +784,7 @@ void Generic6DOFJoint3D::set_param_z(Param p_param, real_t p_value) {
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
ERR_FAIL_INDEX(p_param, PARAM_MAX);
|
|
params_z[p_param] = p_value;
|
|
params_z[p_param] = p_value;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_rid(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
|
|
}
|
|
}
|
|
update_gizmos();
|
|
update_gizmos();
|
|
}
|
|
}
|
|
@@ -796,7 +798,7 @@ void Generic6DOFJoint3D::set_flag_x(Flag p_flag, bool p_enabled) {
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
flags_x[p_flag] = p_enabled;
|
|
flags_x[p_flag] = p_enabled;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_rid(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
|
|
}
|
|
}
|
|
update_gizmos();
|
|
update_gizmos();
|
|
}
|
|
}
|
|
@@ -810,7 +812,7 @@ void Generic6DOFJoint3D::set_flag_y(Flag p_flag, bool p_enabled) {
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
flags_y[p_flag] = p_enabled;
|
|
flags_y[p_flag] = p_enabled;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_rid(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
|
|
}
|
|
}
|
|
update_gizmos();
|
|
update_gizmos();
|
|
}
|
|
}
|
|
@@ -824,7 +826,7 @@ void Generic6DOFJoint3D::set_flag_z(Flag p_flag, bool p_enabled) {
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
|
|
flags_z[p_flag] = p_enabled;
|
|
flags_z[p_flag] = p_enabled;
|
|
if (is_configured()) {
|
|
if (is_configured()) {
|
|
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
|
|
|
|
|
|
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_rid(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
|
|
}
|
|
}
|
|
update_gizmos();
|
|
update_gizmos();
|
|
}
|
|
}
|