Merge pull request #16424 from AndreaCatania/phyj
Added physics API in order to enable/disable collisions between rigidbody attached to a joint with bullet physics bullet
This commit is contained in:
@@ -75,8 +75,7 @@ void Joint2D::_update_joint(bool p_only_free) {
|
||||
ba = body_a->get_rid();
|
||||
bb = body_b->get_rid();
|
||||
|
||||
if (exclude_from_collision)
|
||||
Physics2DServer::get_singleton()->body_add_collision_exception(body_a->get_rid(), body_b->get_rid());
|
||||
Physics2DServer::get_singleton()->joint_disable_collisions_between_bodies(joint, exclude_from_collision);
|
||||
}
|
||||
|
||||
void Joint2D::set_node_a(const NodePath &p_node_a) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user