Table of Contents

Smooth

Methods
public double Smooth(SmoothingSettings settings, double currentValue, double targetValue, double time)

Smoothly lerps the current value towards the target value.

Parameters
Type Name Description
SmoothingSettings settings

Settings used to define smoothing parameters

double currentValue

The current value

double targetValue

The target value which needs to be smoothly reached

double time

Current time (eg. NetworkTime.TimeAsDouble)

Returns
Type Description
double

New value which is smoothly lerped towards the target value

public float Smooth(SmoothingSettings settings, float currentValue, float targetValue, double time)

Smoothly lerps the current value towards the target value.

Parameters
Type Name Description
SmoothingSettings settings

Settings used to define smoothing parameters

float currentValue

The current value

float targetValue

The target value which needs to be smoothly reached

double time

Current time (eg. NetworkTime.TimeAsDouble)

Returns
Type Description
float

New value which is smoothly lerped towards the target value

public Vector2 Smooth(SmoothingSettings settings, Vector2 currentValue, Vector2 targetValue, double time)

Smoothly lerps the current value towards the target value.

Parameters
Type Name Description
SmoothingSettings settings

Settings used to define smoothing parameters

Vector2 currentValue

The current value

Vector2 targetValue

The target value which needs to be smoothly reached

double time

Current time (eg. NetworkTime.TimeAsDouble)

Returns
Type Description
Vector2

New value which is smoothly lerped towards the target value

public Vector3 Smooth(SmoothingSettings settings, Vector3 currentValue, Vector3 targetValue, double time)

Smoothly lerps the current value towards the target value.

Parameters
Type Name Description
SmoothingSettings settings

Settings used to define smoothing parameters

Vector3 currentValue

The current value

Vector3 targetValue

The target value which needs to be smoothly reached

double time

Current time (eg. NetworkTime.TimeAsDouble)

Returns
Type Description
Vector3

New value which is smoothly lerped towards the target value

public Quaternion Smooth(SmoothingSettings settings, Quaternion currentValue, Quaternion targetValue, double time)

Smoothly lerps the current value towards the target value.

Parameters
Type Name Description
SmoothingSettings settings

Settings used to define smoothing parameters

Quaternion currentValue

The current value

Quaternion targetValue

The target value which needs to be smoothly reached

double time

Current time (eg. NetworkTime.TimeAsDouble)

Returns
Type Description
Quaternion

New value which is smoothly lerped towards the target value