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

Add a process mode property to toggle between "process" and "physics" #7

Open
malhotraprateek opened this issue Mar 5, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@malhotraprateek
Copy link

InterpolatedCameraJitter.zip

Attached is a minimal reproduction project where strafing the player using left/right arrow keys shows a jitter.
I believe using _physics_process instead of _process should be the fix to keep the camera in sync with the physics simulation.

@Calinou
Copy link
Member

Calinou commented Mar 5, 2023

I believe using _physics_process instead of _process should be the fix to keep the camera in sync with the physics simulation.

While it should be feasible to add a process mode property, this is the wrong approach to do it. You should set up physics interpolation using https://github.com/lawnjelly/smoothing-addon instead, as you're negating most of the benefits of high refresh rate monitors otherwise (and introducing jitter when the player uses the mouse to look around and moves at the same time).

@Calinou Calinou added the enhancement New feature or request label Mar 5, 2023
@Calinou Calinou changed the title Interpolated camera jitters when moving player Add a process mode property to toggle between "process" and "physics" Mar 5, 2023
@malhotraprateek
Copy link
Author

I tried out the addon you mentioned. It seems like the issue I am having is related to the model not being translated with physics interpolation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants