Merge pull request #48316 from nekomatata/expose-physics-debug-shape-3.x
[3.x] Expose get_debug_mesh in Shape to scripting API
This commit is contained in:
commit
2a1fb62e96
|
@ -10,6 +10,13 @@
|
||||||
<link>https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html</link>
|
<link>https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html</link>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
<methods>
|
<methods>
|
||||||
|
<method name="get_debug_mesh">
|
||||||
|
<return type="ArrayMesh">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
Returns the [ArrayMesh] used to draw the debug collision for this [Shape].
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
|
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
|
||||||
|
|
|
@ -102,6 +102,8 @@ void Shape::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("set_margin", "margin"), &Shape::set_margin);
|
ClassDB::bind_method(D_METHOD("set_margin", "margin"), &Shape::set_margin);
|
||||||
ClassDB::bind_method(D_METHOD("get_margin"), &Shape::get_margin);
|
ClassDB::bind_method(D_METHOD("get_margin"), &Shape::get_margin);
|
||||||
|
|
||||||
|
ClassDB::bind_method(D_METHOD("get_debug_mesh"), &Shape::get_debug_mesh);
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue