Fix simulation reaching different states when started from different snaphots.

This commit is contained in:
Crozet Sébastien
2020-11-02 15:07:50 +01:00
parent 4b8242b9c2
commit 01af6c09a7
16 changed files with 392 additions and 203 deletions

View File

@@ -424,7 +424,11 @@ impl NarrowPhase {
let (generator, workspace) =
dispatcher.dispatch(co1.shape().shape_type(), co2.shape().shape_type());
pair.generator = Some(generator);
pair.generator_workspace = workspace;
// Keep the workspace if one already exists.
if pair.generator_workspace.is_none() {
pair.generator_workspace = workspace;
}
}
let context = ContactGenerationContext {