Delegate AnticipatedNetworkVariable<T>.SmoothDelegate
A function to interpolate between two values based on a percentage. See Lerp(float, float, float), Lerp(Vector3, Vector3, float), Slerp(Vector3, Vector3, float), and so on for examples.
Namespace: Unity.Netcode
Assembly: Unity.Netcode.Runtime.dll
Syntax
public delegate T AnticipatedNetworkVariable<T>.SmoothDelegate(T authoritativeValue, T anticipatedValue, float amount)
Parameters
| Type | Name | Description |
|---|---|---|
| T | authoritativeValue | The authoritative value to interpolate from. |
| T | anticipatedValue | The anticipated value to interpolate to. |
| float | amount | The interpolation factor between 0 and 1. |
Returns
| Type | Description |
|---|---|
| T | The interpolated value. |