Fixed bug where rigidbody setters in the first frame causes a crash #261

Merged
direnbharwani merged 2 commits from SP3-2-Physics into main 2022-11-23 15:33:17 +08:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 4865a49bfa - Show all commits

View File

@ -185,6 +185,7 @@ namespace SHADE
objectManager.commandQueue.pop();
sceneGraph.Traverse(BUILD_NEW_SCENE_PHYSICS_OBJECT);
objectManager.UpdateCommands();
}
void SHPhysicsSystem::ForceUpdate()
@ -443,6 +444,7 @@ namespace SHADE
// Build scene
SHSceneManager::GetCurrentSceneGraph().Traverse(BUILD_PHYSICS_OBJECT);
objectManager.UpdateCommands();
return onPlayEvent->handle;
}