-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling World.step with timeSinceLastCalled === 0 produces undesired results #334
Comments
Yea, it sounds like good idea. I guess I didn't think of this case when I first wrote the code... |
Grimeh
added a commit
to Grimeh/p2.js
that referenced
this issue
Oct 17, 2018
Calling World.step with a `timeSinceLastCalled` of 0 would cause it to revert to the fixed time step behaviour. This was due to the default value of `timeSinceLastCalled` being 0. This change checks for `undefined`, as opposed to 0. See issue schteppe#334 for more details.
I've submitted a PR (#337) with the mentioned changes. |
jramstedt
pushed a commit
to jramstedt/p2.js
that referenced
this issue
Aug 28, 2019
Calling World.step with a `timeSinceLastCalled` of 0 would cause it to revert to the fixed time step behaviour. This was due to the default value of `timeSinceLastCalled` being 0. This change checks for `undefined`, as opposed to 0. See issue schteppe#334 for more details.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I've run into an issue when trying to pause the game (by setting the global time scale to 0) will not pause the physics simulation as well (as desired) but instead make it revert back to the regular fixed time steps.
This is because
World.step
uses 0 as thetimeSinceLastCalled
default value, and therefore the value that indicates that the caller wants fixed time steps:I'm currently working around this by calling
World.step
like:Preferably I would like to be able to call
World.step
withtimeSinceLastCalled === 0
, I think this could be accomplished by replacingwith
Does that seem reasonable?
The text was updated successfully, but these errors were encountered: