From a42765dadad77d4f4893d9ccf73b7cfefc1643bd Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Mon, 5 Feb 2018 18:20:26 +0100 Subject: Added physics API in order to enable/disable collisions between rigidbody attached to a joint with bullet physics bullet Fixes #16424 --- scene/3d/physics_joint.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scene/3d/physics_joint.cpp') diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp index fed6d76f65..2e9f1a241a 100644 --- a/scene/3d/physics_joint.cpp +++ b/scene/3d/physics_joint.cpp @@ -71,8 +71,7 @@ void Joint::_update_joint(bool p_only_free) { ba = body_a->get_rid(); bb = body_b->get_rid(); - if (exclude_from_collision) - PhysicsServer::get_singleton()->body_add_collision_exception(body_a->get_rid(), body_b->get_rid()); + PhysicsServer::get_singleton()->joint_disable_collisions_between_bodies(joint, exclude_from_collision); } void Joint::set_node_a(const NodePath &p_node_a) { -- cgit v1.2.3