diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index e835724e3680..a7b55387a49f 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -990,6 +990,14 @@ Returns the shape data. + + + + + Returns the collision margin for the shape. + [b]Note:[/b] This is not used in Godot Physics, so will always return [code]0[/code]. + + @@ -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 collision margin for the shape. + [b]Note:[/b] This is not used in Godot Physics. + + diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index f56ef11c14f4..cda04e0aae75 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -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("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_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_set_active", "space", "active"), &PhysicsServer3D::space_set_active);