Skip to content

Commit fd71ec6

Browse files
committed
Merge pull request godotengine#112002 from The-Cyber-Captain/expose-joint-rid-to-physical-bone-3d-13392
Add `get_joint_rid()` to `PhysicalBone3D`.
2 parents 7df7886 + 3e9a09a commit fd71ec6

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

doc/classes/PhysicalBone3D.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
Returns the unique identifier of the PhysicsBone3D.
4444
</description>
4545
</method>
46+
<method name="get_joint_rid" qualifiers="const">
47+
<return type="RID" />
48+
<description>
49+
Returns the joint's internal [RID] from the [PhysicsServer3D].
50+
</description>
51+
</method>
4652
<method name="get_simulate_physics">
4753
<return type="bool" />
4854
<description>

scene/3d/physics/physical_bone_3d.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,8 @@ void PhysicalBone3D::_bind_methods() {
842842
ClassDB::bind_method(D_METHOD("set_joint_type", "joint_type"), &PhysicalBone3D::set_joint_type);
843843
ClassDB::bind_method(D_METHOD("get_joint_type"), &PhysicalBone3D::get_joint_type);
844844

845+
ClassDB::bind_method(D_METHOD("get_joint_rid"), &PhysicalBone3D::get_joint_rid);
846+
845847
ClassDB::bind_method(D_METHOD("set_joint_offset", "offset"), &PhysicalBone3D::set_joint_offset);
846848
ClassDB::bind_method(D_METHOD("get_joint_offset"), &PhysicalBone3D::get_joint_offset);
847849
ClassDB::bind_method(D_METHOD("set_joint_rotation", "euler"), &PhysicalBone3D::set_joint_rotation);

scene/3d/physics/physical_bone_3d.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ class PhysicalBone3D : public PhysicsBody3D {
239239
return bone_id;
240240
}
241241

242+
RID get_joint_rid() const {
243+
return joint;
244+
}
245+
242246
void set_joint_type(JointType p_joint_type);
243247
JointType get_joint_type() const;
244248

0 commit comments

Comments
 (0)