mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Expose get_debug_mesh in Shape3D to scripting API
Can be useful for custom drawing of physics shapes without having to add a collision object node to the tree.
This commit is contained in:
parent
639b02f454
commit
7352a4c0d9
@ -10,6 +10,13 @@
|
||||
<link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_debug_mesh">
|
||||
<return type="ArrayMesh">
|
||||
</return>
|
||||
<description>
|
||||
Returns the [ArrayMesh] used to draw the debug collision for this [Shape3D].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
|
||||
|
@ -102,6 +102,8 @@ void Shape3D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_margin", "margin"), &Shape3D::set_margin);
|
||||
ClassDB::bind_method(D_METHOD("get_margin"), &Shape3D::get_margin);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_debug_mesh"), &Shape3D::get_debug_mesh);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user