Skip to content

Commit f4a4ec7

Browse files
authored
[src] Fix problem of wrong dt and gravity values applied when reconnecting scenes (#250)
fix InfinyTech3D/SurgiViz4D#318
1 parent 752a365 commit f4a4ec7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Core/Scripts/SofaContext.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,9 @@ protected void ReconnectSofaScene()
662662
m_impl.loadScene(m_sceneFileMgr.AbsoluteFilename());
663663
}
664664

665-
// Do not retrieve timestep of gravity in case it has been changed in editor
665+
// This is cause of error. TODO: find a way to not retrieve those values only if they have been changed intentionnaly in the editor
666+
m_timeStep = m_impl.timeStep;
667+
m_gravity = m_impl.getGravity();
666668

667669
// re-create objects after scene loading and before graph reconnection
668670
foreach (SofaBaseObject obj in m_objects)

0 commit comments

Comments
 (0)