You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we should consider adding delta_time as a parameter to the update method on Physics Engines such that we can use that for time tracking as opposed to time.time(). The built-in time function is known to have precision problems and can't really be relied on in increments less than 1 second.
That's gonna incur a lot of update work on documentation/example code though, so that's perhaps out of band of this PR. We could default it to 1 / 60 to keep backwards compat, but given we're working on 4.0 versions right now, I think it's best to break the API and assume that when using the built-in physics engines you need to passthrough the delta_time, at least for something like the Platformer one and any equally or more advanced than that.
Yeah that makes sense, Since I am already in this part of the code, would you like me to refactor the update method to accept delta_time and update the jump tracking logic to use it, or would you like to handle this in a separate PR?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Fixes # 1848
jump_cooldowntoPhysicsEnginePlatformer.can_jump.