You've already forked godot
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user