FullFrontalFrog / OhSoHeroTracker

Issue tracker / bug report list for Oh So Hero!
2 stars 0 forks source link

Character animation stuttering #67

Open MagLjudik opened 1 year ago

MagLjudik commented 1 year ago

Oh So Hero! v.0.19.100 As reported by one of our community members:

One thing noticed is that ~50 FPS caps are reintroduced to character movement at some point with inconsistant frame timings with movement, causing major stutter as most of the time camera is also locked to characters movement. This is so common Unity problem that there's people instructing how to fix this yourself at this point as same fix works for so many games: https://steamcommunity.com/app/994140/discussions/0/3476150562411943121/?ctp=4#c3776868105342045105

You can still see game updates every frame with effects like the torch in the background. Recorded 120 FPS, slowed 1/4th to 30 FPS to make it more clear with frame counter on bottom right, check frame-by-frame or slower if necessary:

https://cdn.discordapp.com/attachments/606030998404333609/1111066723194511380/OhSoHero_2023-05-25_01-39-51-845.webm

FullFrontalFrog commented 1 year ago

I will try to address this in the future, but this may be problematic because we have already designed so much of the physics around the 50 FPS default. Last time I tried doing this, it changed the behavior of all of the springs in the game and I had to revert it. I have a private tracker issue #869 to address this.

FullFrontalFrog commented 1 month ago

The reason this happens on many Unity games is because the default Fixed Timestep is 0.02 seconds. This means FixedUpdate will be called precisely 50 times a second. I have a potential fix for character movement in 0.20.600 where I simply use Update and DeltaTime instead of FixedUpdate and FixedDeltaTime. However, jumping relies on force instead of speed, so that will continue to use FixedUpdate for now. To be retested in 0.20.600.