summaryrefslogtreecommitdiff
path: root/modules/bullet/bullet_physics_server.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-30 11:43:11 +0200
committerGitHub <noreply@github.com>2019-04-30 11:43:11 +0200
commitf40c62fa29e8b08fe69487efa92fd08a3dea742c (patch)
tree233141d0d8b516ce95830fa898cba244fe29d350 /modules/bullet/bullet_physics_server.cpp
parent6ee5f7c8819847615c5e96ed92a2a86737350459 (diff)
parenta9d4cde0f5abc399332dde0c7415b99a5796eb34 (diff)
Merge pull request #27371 from ShyRed/fixdisabled2dcollisions
Allow adding disabled shapes
Diffstat (limited to 'modules/bullet/bullet_physics_server.cpp')
-rw-r--r--modules/bullet/bullet_physics_server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 44ea061f51..b21bdee052 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -279,14 +279,14 @@ PhysicsServer::AreaSpaceOverrideMode BulletPhysicsServer::area_get_space_overrid
return area->get_spOv_mode();
}
-void BulletPhysicsServer::area_add_shape(RID p_area, RID p_shape, const Transform &p_transform) {
+void BulletPhysicsServer::area_add_shape(RID p_area, RID p_shape, const Transform &p_transform, bool p_disabled) {
AreaBullet *area = area_owner.get(p_area);
ERR_FAIL_COND(!area);
ShapeBullet *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape);
- area->add_shape(shape, p_transform);
+ area->add_shape(shape, p_transform, p_disabled);
}
void BulletPhysicsServer::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
@@ -498,7 +498,7 @@ PhysicsServer::BodyMode BulletPhysicsServer::body_get_mode(RID p_body) const {
return body->get_mode();
}
-void BulletPhysicsServer::body_add_shape(RID p_body, RID p_shape, const Transform &p_transform) {
+void BulletPhysicsServer::body_add_shape(RID p_body, RID p_shape, const Transform &p_transform, bool p_disabled) {
RigidBodyBullet *body = rigid_body_owner.get(p_body);
ERR_FAIL_COND(!body);
@@ -506,7 +506,7 @@ void BulletPhysicsServer::body_add_shape(RID p_body, RID p_shape, const Transfor
ShapeBullet *shape = shape_owner.get(p_shape);
ERR_FAIL_COND(!shape);
- body->add_shape(shape, p_transform);
+ body->add_shape(shape, p_transform, p_disabled);
}
void BulletPhysicsServer::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) {