ScriptReference/Mathf.SmoothDamp #613
Replies: 1 comment
-
|
Mathf.SmoothDamp will generate a NaN if Time.deltaTime is zero. Even if it's not supplied. void Update() {
if (Time.deltaTime != 0f) {
newPosition = Mathf.SmoothDamp(newPosition, oldPosition, ref velocity);
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/Mathf.SmoothDamp
https://docs.unity3d.com/ScriptReference/Mathf.SmoothDamp.html
Beta Was this translation helpful? Give feedback.
All reactions