Skip to content
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

Physics movement is not interpolated. #51

Closed
drwhut opened this issue Mar 13, 2021 · 1 comment
Closed

Physics movement is not interpolated. #51

drwhut opened this issue Mar 13, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@drwhut
Copy link
Owner

drwhut commented Mar 13, 2021

Describe the bug
If the refresh rate of the monitor is higher than the physics framerate (default is 60Hz), then physically-driven objects visibly stutter due to the object's movement not being interpolated in-between physics frames.

To Reproduce
Steps to reproduce the behavior:

  1. Open the game via the Godot editor.
  2. Lower the physics FPS in the project settings to around half the refresh rate of the monitor.
  3. Launch the game, and enter a singleplayer instance.
  4. See that when objects are moving (either on their own or if the player is moving them), they appear "laggy".

Expected behavior
Objects should appear to move smoothly, no matter what the physics framerate or the monitor refresh rate is.

Screenshots
None.

Environment
Linux Mint 20

Version
master

Additional context
There is a proposal to add this functionality to Godot itself: godotengine/godot-proposals#671

Since it is not currently in Godot, there is both an addon and a module to implement it.

@drwhut drwhut added the bug Something isn't working label Mar 13, 2021
@drwhut drwhut added this to the v0.1.0 milestone Mar 13, 2021
@drwhut
Copy link
Owner Author

drwhut commented Mar 14, 2021

Fixed by adding frame interpolation directly to the engine using code from the comments of the proposal mentioned above.

@drwhut drwhut closed this as completed Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant