mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 14:13:10 +00:00
Revert "Move Bullet physics query flush from Bullet space pre-tick callback to"
This reverts commit e7d8464f87
.
Fixes #40508 regression.
This will be re-applied and the regression fixed for a future 3.2.x release.
This commit is contained in:
parent
ba3f0fa971
commit
10544f1cf7
@ -1572,12 +1572,6 @@ void BulletPhysicsServer::sync() {
|
||||
}
|
||||
|
||||
void BulletPhysicsServer::flush_queries() {
|
||||
if (!active)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < active_spaces_count; ++i) {
|
||||
active_spaces[i]->flush_queries();
|
||||
}
|
||||
}
|
||||
|
||||
void BulletPhysicsServer::finish() {
|
||||
|
@ -561,6 +561,10 @@ void SpaceBullet::remove_all_collision_objects() {
|
||||
}
|
||||
}
|
||||
|
||||
void onBulletPreTickCallback(btDynamicsWorld *p_dynamicsWorld, btScalar timeStep) {
|
||||
static_cast<SpaceBullet *>(p_dynamicsWorld->getWorldUserInfo())->flush_queries();
|
||||
}
|
||||
|
||||
void onBulletTickCallback(btDynamicsWorld *p_dynamicsWorld, btScalar timeStep) {
|
||||
|
||||
const btCollisionObjectArray &colObjArray = p_dynamicsWorld->getCollisionObjectArray();
|
||||
@ -632,6 +636,7 @@ void SpaceBullet::create_empty_world(bool p_create_soft_world) {
|
||||
|
||||
dynamicsWorld->setWorldUserInfo(this);
|
||||
|
||||
dynamicsWorld->setInternalTickCallback(onBulletPreTickCallback, this, true);
|
||||
dynamicsWorld->setInternalTickCallback(onBulletTickCallback, this, false);
|
||||
dynamicsWorld->getBroadphase()->getOverlappingPairCache()->setInternalGhostPairCallback(ghostPairCallback); // Setup ghost check
|
||||
dynamicsWorld->getPairCache()->setOverlapFilterCallback(godotFilterCallback);
|
||||
|
Loading…
Reference in New Issue
Block a user