Bind physics server methods related to shape margin

This commit is contained in:
Mikael Hermansson 2024-05-19 12:26:20 +02:00
parent daa81bbb7d
commit a23717c8c6
2 changed files with 19 additions and 0 deletions

View File

@ -990,6 +990,14 @@
Returns the shape data. Returns the shape data.
</description> </description>
</method> </method>
<method name="shape_get_margin" qualifiers="const">
<return type="float" />
<param index="0" name="shape" type="RID" />
<description>
Returns the collision margin for the shape.
[b]Note:[/b] This is not used in Godot Physics, so will always return [code]0[/code].
</description>
</method>
<method name="shape_get_type" qualifiers="const"> <method name="shape_get_type" qualifiers="const">
<return type="int" enum="PhysicsServer3D.ShapeType" /> <return type="int" enum="PhysicsServer3D.ShapeType" />
<param index="0" name="shape" type="RID" /> <param index="0" name="shape" type="RID" />
@ -1005,6 +1013,15 @@
Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].
</description> </description>
</method> </method>
<method name="shape_set_margin">
<return type="void" />
<param index="0" name="shape" type="RID" />
<param index="1" name="margin" type="float" />
<description>
Sets the collision margin for the shape.
[b]Note:[/b] This is not used in Godot Physics.
</description>
</method>
<method name="slider_joint_get_param" qualifiers="const"> <method name="slider_joint_get_param" qualifiers="const">
<return type="float" /> <return type="float" />
<param index="0" name="joint" type="RID" /> <param index="0" name="joint" type="RID" />

View File

@ -704,9 +704,11 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("custom_shape_create"), &PhysicsServer3D::custom_shape_create); ClassDB::bind_method(D_METHOD("custom_shape_create"), &PhysicsServer3D::custom_shape_create);
ClassDB::bind_method(D_METHOD("shape_set_data", "shape", "data"), &PhysicsServer3D::shape_set_data); ClassDB::bind_method(D_METHOD("shape_set_data", "shape", "data"), &PhysicsServer3D::shape_set_data);
ClassDB::bind_method(D_METHOD("shape_set_margin", "shape", "margin"), &PhysicsServer3D::shape_set_margin);
ClassDB::bind_method(D_METHOD("shape_get_type", "shape"), &PhysicsServer3D::shape_get_type); ClassDB::bind_method(D_METHOD("shape_get_type", "shape"), &PhysicsServer3D::shape_get_type);
ClassDB::bind_method(D_METHOD("shape_get_data", "shape"), &PhysicsServer3D::shape_get_data); ClassDB::bind_method(D_METHOD("shape_get_data", "shape"), &PhysicsServer3D::shape_get_data);
ClassDB::bind_method(D_METHOD("shape_get_margin", "shape"), &PhysicsServer3D::shape_get_margin);
ClassDB::bind_method(D_METHOD("space_create"), &PhysicsServer3D::space_create); ClassDB::bind_method(D_METHOD("space_create"), &PhysicsServer3D::space_create);
ClassDB::bind_method(D_METHOD("space_set_active", "space", "active"), &PhysicsServer3D::space_set_active); ClassDB::bind_method(D_METHOD("space_set_active", "space", "active"), &PhysicsServer3D::space_set_active);