asim-shrestha / showdown

A 2D platformer battle royal made with Unity. Play against friends and foe through multiple "Showdowns" until one player is ultimately victorious.
3 stars 0 forks source link

Physics objects on different computers have different velocities due to framerate difference. #14

Open seannam1218 opened 4 years ago

seannam1218 commented 4 years ago

Wall sliding is noticeably faster on Unity player as opposed to on a build. This is probably due to using Update function which updates frames with respect to frame rate. If so, FixedUpdate would solve this problem, but in my experience, FixedUpdate does not catch keyboard inputs sometimes, so it's not a great option. A solution could be to use Time.deltaTime or to use both Update (for key inputs) and FixedUpdate (for physics interactions) together.

Or the problem could be something else entirely.