From 08a80962cfe25ad2891da0d74083a4fedd694319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bengt=20S=C3=B6derstr=C3=B6m?= Date: Mon, 30 Aug 2021 20:07:14 +0200 Subject: Expose soft body pin methods to GDScript --- scene/3d/soft_body_3d.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index a7ff0842d2..b368200971 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -361,6 +361,11 @@ void SoftBody3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_drag_coefficient", "drag_coefficient"), &SoftBody3D::set_drag_coefficient); ClassDB::bind_method(D_METHOD("get_drag_coefficient"), &SoftBody3D::get_drag_coefficient); + ClassDB::bind_method(D_METHOD("get_point_transform", "point_index"), &SoftBody3D::get_point_transform); + + ClassDB::bind_method(D_METHOD("set_point_pinned", "point_index", "pinned", "attachment_path"), &SoftBody3D::pin_point, DEFVAL(NodePath())); + ClassDB::bind_method(D_METHOD("is_point_pinned", "point_index"), &SoftBody3D::is_point_pinned); + ClassDB::bind_method(D_METHOD("set_ray_pickable", "ray_pickable"), &SoftBody3D::set_ray_pickable); ClassDB::bind_method(D_METHOD("is_ray_pickable"), &SoftBody3D::is_ray_pickable); -- cgit v1.2.3 From 3a323c4b974e248c25da1a760dec2a00da41a757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bengt=20S=C3=B6derstr=C3=B6m?= Date: Mon, 30 Aug 2021 21:48:52 +0200 Subject: Documented soft body pinning methods --- doc/classes/SoftBody3D.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index 53bd7e67bf..241c988fe6 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -42,6 +42,20 @@ + + + + + Returns local translation of a vertex in the surface array. + + + + + + + Returns [code]true[/code] if vertex is set to pinned. + + @@ -65,6 +79,15 @@ Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + + + + + + + Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to. + + -- cgit v1.2.3