Exposes joint_rid based on Riordan-DCs approach.

This commit is contained in:
The-Cyber-Captain
2025-10-24 18:09:18 +01:00
parent 084d5d407e
commit d83f28c729
3 changed files with 12 additions and 0 deletions
+6
View File
@@ -42,6 +42,12 @@
Returns the unique identifier of the PhysicsBone3D.
</description>
</method>
<method name="get_joint_rid" qualifiers="const">
<return type="RID" />
<description>
Returns the joint's internal [RID] from the [PhysicsServer3D].
</description>
</method>
<method name="get_simulate_physics">
<return type="bool" />
<description>
+2
View File
@@ -835,6 +835,8 @@ void PhysicalBone3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_joint_type", "joint_type"), &PhysicalBone3D::set_joint_type);
ClassDB::bind_method(D_METHOD("get_joint_type"), &PhysicalBone3D::get_joint_type);
ClassDB::bind_method(D_METHOD("get_joint_rid"), &PhysicalBone3D::get_joint_rid);
ClassDB::bind_method(D_METHOD("set_joint_offset", "offset"), &PhysicalBone3D::set_joint_offset);
ClassDB::bind_method(D_METHOD("get_joint_offset"), &PhysicalBone3D::get_joint_offset);
ClassDB::bind_method(D_METHOD("set_joint_rotation", "euler"), &PhysicalBone3D::set_joint_rotation);
+4
View File
@@ -239,6 +239,10 @@ public:
return bone_id;
}
RID get_joint_rid() const {
return joint;
}
void set_joint_type(JointType p_joint_type);
JointType get_joint_type() const;