summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-20 21:43:57 +0100
committerGitHub <noreply@github.com>2021-03-20 21:43:57 +0100
commit793000c6a90211a32b478fb550d82221e2817da0 (patch)
treeac791156e0bb38c3e469df0f13c922656aba5c33 /modules
parente48f0ee497b65398098151b2bd51fdc4c92de134 (diff)
parent7bbd5454329e483c67f51dba960213da930bda1d (diff)
Merge pull request #47139 from nekomatata/concave-backface-collision
Disable backface collision with ConcavePolygonShape by default
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/shape_bullet.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index 82876ab77c..471b154813 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -375,11 +375,17 @@ ConcavePolygonShapeBullet::~ConcavePolygonShapeBullet() {
}
void ConcavePolygonShapeBullet::set_data(const Variant &p_data) {
- setup(p_data);
+ Dictionary d = p_data;
+ ERR_FAIL_COND(!d.has("faces"));
+
+ setup(d["faces"]);
}
Variant ConcavePolygonShapeBullet::get_data() const {
- return faces;
+ Dictionary d;
+ d["faces"] = faces;
+
+ return d;
}
PhysicsServer3D::ShapeType ConcavePolygonShapeBullet::get_type() const {