SmoothDamp is frame dependent even with Time.deltaTime

I am making my first 2D game and every movement (except for projectiles) is made with Vector2.SmoothDamp.
Here is for example my player movement:
transform.position = Vector2.SmoothDamp(transform.position, movePoint, ref velocity, smoothTime * Time.deltaTime);
Everything works fine with this method, except for when I build the game and try it on my phone.
Now everything that uses SmoothDamp is slower, making the game unplayable.
Should I just move every SmoothDamp in a Fixed Update or is there a quicker solution?

I think you should not multiply the smoothTime parameter with deltaTime as according to the docs: Unity - Scripting API: Vector2.SmoothDamp it is the time it will take to reach the target. Multiplying it by deltaTime you are making the time shorter when the FPS is higher.

So make it a constant instead of multiplying by deltaTime.

2 Likes