❔ Unity deltaTime error

this is my code, when I multiply the damping by deltaTime it breaks the spring but without timeDelta the spring still breaks at lower framerates. what can I do? public (float, float) Spring(float current, float velocity, float goal,float powerConst, float dampingConst) { float damping = velocity * dampingConst; velocity += (goal - current) * powerConst; current += (velocity - damping) * Time.deltaTime; return(current, velocity); }
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server