joints example bug reproduction + a 'fix' in userspace #536
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
code for investigation on #535.
What I did in this PR:
app.update()
), code is in comments.My hypotheses:
NaN
translation/rotation arrive during the simulation, a call to rapier function. So either it's a bug from rapier, or the state calling of the rapier context is invalid somehow. Either way, debugging this is overwhelming and resolution for that would benefit including a debugging helper (error messages, CI, examples...).delta_time
being0
is the cause forNaN
values 🎉 !investigation for inconsistent rapier state
the dynamic body is getting
NaN
translation/rotation after the first simulation run:🟢 The deltatime of
integration_parameters
being0
is causing the simulation to return theNaN
values. If I force set it to0.0000001
before the first simulation, the behaviour works as expected 🎉 !Now for the proper fix, we have several options:
NaN
values and fix that. 🔍 Currently investigating.Opened dimforge/rapier#660 to fix that within rapier.
investigation on system order ambiguities
Helpful to get a feeling about current ambiguities: Vrixyz#21
Current ambiguities reported by bevy detection: