mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 04:33:29 +00:00
Fixed collision exception - #12681
This commit is contained in:
parent
b279f641c0
commit
5f110c5b98
@ -93,11 +93,15 @@ void CollisionObjectBullet::setupBulletCollisionObject(btCollisionObject *p_coll
|
||||
void CollisionObjectBullet::add_collision_exception(const CollisionObjectBullet *p_ignoreCollisionObject) {
|
||||
exceptions.insert(p_ignoreCollisionObject->get_self());
|
||||
bt_collision_object->setIgnoreCollisionCheck(p_ignoreCollisionObject->bt_collision_object, true);
|
||||
if (space)
|
||||
space->get_broadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bt_collision_object->getBroadphaseHandle(), space->get_dispatcher());
|
||||
}
|
||||
|
||||
void CollisionObjectBullet::remove_collision_exception(const CollisionObjectBullet *p_ignoreCollisionObject) {
|
||||
exceptions.erase(p_ignoreCollisionObject->get_self());
|
||||
bt_collision_object->setIgnoreCollisionCheck(p_ignoreCollisionObject->bt_collision_object, false);
|
||||
if (space)
|
||||
space->get_broadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bt_collision_object->getBroadphaseHandle(), space->get_dispatcher());
|
||||
}
|
||||
|
||||
bool CollisionObjectBullet::has_collision_exception(const CollisionObjectBullet *p_otherCollisionObject) const {
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
void flush_queries();
|
||||
void step(real_t p_delta_time);
|
||||
|
||||
_FORCE_INLINE_ btBroadphaseInterface *get_broadphase() { return broadphase; }
|
||||
_FORCE_INLINE_ btCollisionDispatcher *get_dispatcher() { return dispatcher; }
|
||||
_FORCE_INLINE_ btSoftBodyWorldInfo *get_soft_body_world_info() { return soft_body_world_info; }
|
||||
_FORCE_INLINE_ bool is_using_soft_world() { return soft_body_world_info; }
|
||||
|
Loading…
Reference in New Issue
Block a user