docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BufferedLinearInterpolator<T>

    Solves for incoming values that are jittered Partially solves for message loss. Unclamped lerping helps hide this, but not completely

    Inheritance
    object
    BufferedLinearInterpolator<T>
    BufferedLinearInterpolatorFloat
    BufferedLinearInterpolatorQuaternion
    BufferedLinearInterpolatorVector3
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Netcode
    Assembly: solution.dll
    Syntax
    public abstract class BufferedLinearInterpolator<T> where T : struct
    Type Parameters
    Name Description
    T

    The type of interpolated value

    Fields

    Name Description
    MaximumInterpolationTime

    There's two factors affecting interpolation: buffering (set in NetworkManager's NetworkTimeSystem) and interpolation time, which is the amount of time it'll take to reach the target. This is to affect the second one.

    Methods

    Name Description
    AddMeasurement(T, double)

    Add measurements to be used during interpolation. These will be buffered before being made available to be displayed as "latest value".

    Clear()

    Resets interpolator to initial state

    GetInterpolatedValue()

    Gets latest value from the interpolator. This is updated every update as time goes by.

    Interpolate(T, T, float)

    Method to override and adapted to the generic type. This assumes interpolation for that value will be clamped.

    InterpolateUnclamped(T, T, float)

    Method to override and adapted to the generic type. This assumes interpolation for that value will not be clamped.

    ResetTo(T, double)

    Teleports current interpolation value to targetValue.

    Update(float, double, double)

    Call to update the state of the interpolators before reading out

    Update(float, NetworkTime)

    Convenience version of 'Update' mainly for testing the reason we don't want to always call this version is so that on the calling side we can compute the renderTime once for the many things being interpolated (and the many interpolators per object)

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)