PlatformerUtilities.

SmoothDamp(float, float, float, float) Method

Summary

Returns the `target` if `smoothTime` is 0. Otherwise calls UnityEngine.Mathf.SmoothDamp(System.Single,System.Single,System.Single@,System.Single).
Assembly
PlatformerGameKit.dll
Namespace
PlatformerGameKit
Containing Type
PlatformerUtilities

Syntax

public static float SmoothDamp(float current, float target, ref float velocity, float smoothTime)

Remarks

UnityEngine.Mathf.SmoothDamp(System.Single,System.Single,System.Single@,System.Single) has a (very small) minimum threshold for `smoothTime` which can prevent the result from exactly reaching the `target` and is often undesirable.

Parameters

Name Type Description
current float
target float
velocity float
smoothTime float

Return Value

Type Description
float