Table of Contents

PerformInterpolation

Methods
public T PerformInterpolation(T currentValue, double time)

Performs interpolation on the given binding and returns its new value. Increments Time for this binding, taking Delay into account. Calculates the interpolated value for the latency-adjusted time using the interpolator. Applies additional Coherence.Interpolation.BindingInterpolator`1.smoothing for types that support it (float, double, Vector2, Vector3, Quaternion). If the sample buffer is empty, the currentValue will be returned. If the sample buffer contains a single sample, that sample value is returned with no blending or smoothing performed.

Parameters
Type Name Description
T currentValue

The current value for the binding.

double time

The current game time, usually NetworkTime.

Returns
Type Description
T

The interpolated value for this binding at the given time, or currentValue if the sample buffer is empty.