1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Disable backface collision with ConcavePolygonShape by default

Helps a lot with soft bodies and generally useful to avoid shapes to go
through the ground in certain cases.

Added an option in ConcavePolygonShape to re-enable backface collision
on specific bodies if needed.
This commit is contained in:
PouleyKetchoupp
2021-03-11 18:15:31 -07:00
parent c097ce0c18
commit 7bbd545432
8 changed files with 223 additions and 79 deletions

View File

@@ -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 {