-
Notifications
You must be signed in to change notification settings - Fork 246
Description
Issues
When changing Time.timeScale, the raycast on the ground doesn't work properly. It keeps bounce the character back above.
Normal (Time.timeScale = 1f)
https://media.giphy.com/media/XGt7SbvRbvBiwBUR6K/giphy.gif
Wrong (Time.timeScale = 0.2f)
https://media.giphy.com/media/QC6lhQ4qb15FDVkzC7/giphy.gif
Additionally, if the framerate is not capped to 60, the bouncing effect will be even more obvious.
Possible Problem
When checking CharacterController2D.cs, in moveVertically(ref deltaMovement) function, something weird happens there.
deltaMovement.y was set to be skinWidth. Which possibly means the origins of raycast are set up wrong.
No idea why this only happens when Time.timeScale goes low.
Apparently the the ray distance is so small, that eventually the skin layer is already beneath the platform. It make sense to bounce it back to the surface, however, I don't know why it keeps going up instead of stops there.
Thank you very much for developing such a brilliant plugin!

