Fixed fatal bug that caused a crash on changing scenes with the editor enabled #255

Merged
direnbharwani merged 3 commits from SP3-2-Physics into main 2022-11-23 02:45:51 +08:00
1 changed files with 4 additions and 4 deletions
Showing only changes of commit 2523613732 - Show all commits

View File

@ -265,11 +265,11 @@ namespace SHADE
return; return;
} }
const int NUM_SHAPES = static_cast<int>(componentGroup.colliderComponent->GetCollisionShapes().size()); //const int NUM_SHAPES = static_cast<int>(componentGroup.colliderComponent->GetCollisionShapes().size());
for (int i = 0; i < NUM_SHAPES; ++i) //for (int i = 0; i < NUM_SHAPES; ++i)
physicsObject->AddCollisionShape(i); // physicsObject->AddCollisionShape(i);
physicsObject->SyncColliders(*componentGroup.colliderComponent); //physicsObject->SyncColliders(*componentGroup.colliderComponent);
} }
void SHPhysicsObjectManager::removeRigidBody(const QueueCommand&, SHPhysicsObject* physicsObject, const PhysicsComponentGroup& componentGroup) void SHPhysicsObjectManager::removeRigidBody(const QueueCommand&, SHPhysicsObject* physicsObject, const PhysicsComponentGroup& componentGroup)