Class BufferedLinearInterpolatorFloat
Solves for incoming values that are jittered. Partially solves for message loss. Unclamped lerping helps hide this, but not completely
Inherited Members
Namespace: Unity.Netcode
Assembly: Unity.Netcode.Runtime.dll
Syntax
public class BufferedLinearInterpolatorFloat : BufferedLinearInterpolator<float>
Remarks
This is a buffered linear interpolator for a float type value
Methods
Interpolate(float, float, float)
Method to override and adapted to the generic type. This assumes interpolation for that value will be clamped.
Declaration
protected override float Interpolate(float start, float end, float time)
Parameters
Type | Name | Description |
---|---|---|
float | start | The start value (min) |
float | end | The end value (max) |
float | time | The time value used to interpolate between start and end values (pos) |
Returns
Type | Description |
---|---|
float | The interpolated value |
Overrides
InterpolateUnclamped(float, float, float)
Method to override and adapted to the generic type. This assumes interpolation for that value will not be clamped.
Declaration
protected override float InterpolateUnclamped(float start, float end, float time)
Parameters
Type | Name | Description |
---|---|---|
float | start | The start value (min) |
float | end | The end value (max) |
float | time | The time value used to interpolate between start and end values (pos) |
Returns
Type | Description |
---|---|
float | The interpolated value |