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

choppy movement when playing at high refresh rates #149

Open
C34A opened this issue Dec 7, 2020 · 2 comments
Open

choppy movement when playing at high refresh rates #149

C34A opened this issue Dec 7, 2020 · 2 comments
Labels

Comments

@C34A
Copy link

C34A commented Dec 7, 2020

Describe the bug

When playing at high refresh rates (~120+fps), it becomes quite obvious that movement is being updated at a much lower rate than view control, making it feel somewhat choppy. This appears to be due to it using FixedUpdate(), which is presumably running at 50 or 60 Hz. I didn't do a ton of digging around, but it looks like just changing the bool useFixedUpdate = true; in AimScript.cs to false would solve this problem? I haven't figured out how to properly get this repo working in unity so I haven't been able to experiment, but this seems like a simple fix in any case. ¯\_(ツ)_/¯

To Reproduce
Steps to reproduce the behavior:

  1. use high refresh rate monitor
  2. enable v-sync to bypass 60fps cap
  3. move around, look around, observe non-smoothness?

Expected behavior

smooth movement

@C34A C34A added the bug label Dec 7, 2020
@Kroporo
Copy link
Member

Kroporo commented Dec 12, 2020

It sadly isn't as easy as setting useFixedUpdate = false, this will make the player accelerate upwards to infinity.
I've spend about 2-3 hours trying to work out what exactly is happening, but there is so much technical debt involved.
It sometimes straight up throws without you jumping because of hight_spring.state being NaN.

Will have another go at it at another day.

@C34A
Copy link
Author

C34A commented Dec 12, 2020

hmm ok, that is what I was afraid of. hopefully a straightforward solution can be found still.

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

No branches or pull requests

2 participants