Improved Physics

This commit is contained in:
Vulpovile
2022-10-02 17:56:50 -07:00
parent c27aa6a114
commit af8823c508
5 changed files with 16 additions and 688 deletions

View File

@@ -329,7 +329,7 @@ void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
toDelete.push_back(partInstance);
}
else
_dataModel->getEngine()->createBody(partInstance, sdt*15/_dataModel->getWorkspace()->partObjects.size());
_dataModel->getEngine()->createBody(partInstance);
}
while(toDelete.size() > 0)
{
@@ -338,6 +338,10 @@ void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
p->setParent(NULL);
delete p;
}
for(int i = 0; i < 8; i++)
{
_dataModel->getEngine()->step(sdt*2);
}
onLogic();
}