docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BurstLerpUtility

    Provides utility methods for various types of interpolations.

    Inheritance
    object
    BurstLerpUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Interaction.Toolkit.Utilities
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public static class BurstLerpUtility

    Methods

    BezierLerp(float, float, float, float)

    Performs a quadratic Bezier interpolation between two float values. This method calculates a control point as an offset from the midpoint between the start and end values, creating a curved path.

    Declaration
    public static float BezierLerp(float start, float end, float t, float controlHeightFactor = 0.5)
    Parameters
    Type Name Description
    float start

    Starting float value.

    float end

    Ending float value.

    float t

    Interpolation factor.

    float controlHeightFactor

    Offset factor for the control point from the midpoint. Defaults to 0.5f.

    Returns
    Type Description
    float

    The interpolated float result.

    BezierLerp(in float3, in float3, float, out float3, float)

    Performs a quadratic Bezier interpolation between two float3 values using a single interpolation factor. Outputs the result in an out parameter.

    Declaration
    public static void BezierLerp(in float3 start, in float3 end, float t, out float3 result, float controlHeightFactor = 0.5)
    Parameters
    Type Name Description
    float3 start

    Starting float3 value.

    float3 end

    Ending float3 value.

    float t

    Interpolation factor.

    float3 result

    Output interpolated float3 result.

    float controlHeightFactor

    Offset factor for the control point from the midpoint. Defaults to 0.5f.

    BezierLerp(in Vector3, in Vector3, float, float)

    Performs a quadratic Bezier interpolation between two Vector3 values. This method uses the BezierLerp function for float3 types to perform the interpolation, allowing the method to be Burst-compiled for performance.

    Declaration
    public static Vector3 BezierLerp(in Vector3 start, in Vector3 end, float t, float controlHeightFactor = 0.5)
    Parameters
    Type Name Description
    Vector3 start

    Starting Vector3 value.

    Vector3 end

    Ending Vector3 value.

    float t

    Interpolation factor.

    float controlHeightFactor

    Offset factor for the control point from the midpoint. Defaults to 0.5f.

    Returns
    Type Description
    Vector3

    The interpolated Vector3 result.

    BounceOutLerp(float, float, float, float)

    Performs a bounce-out interpolation between two float values. The interpolation creates a bounce effect towards the end.

    Declaration
    public static float BounceOutLerp(float start, float end, float t, float speed = 1)
    Parameters
    Type Name Description
    float start

    Starting float value.

    float end

    Ending float value.

    float t

    Interpolation factor, typically between 0 and 1.

    float speed

    Speed factor of the bounce effect. Default is 1.

    Returns
    Type Description
    float

    The interpolated float result.

    BounceOutLerp(in float3, in float3, float, out float3, float)

    Performs a bounce-out interpolation between two float3 values. The interpolation creates a bounce effect towards the end.

    Declaration
    public static void BounceOutLerp(in float3 start, in float3 end, float t, out float3 result, float speed = 1)
    Parameters
    Type Name Description
    float3 start

    Starting float3 value.

    float3 end

    Ending float3 value.

    float t

    Interpolation factor, typically between 0 and 1.

    float3 result

    The interpolated float3 result.

    float speed

    Speed factor of the bounce effect. Default is 1.

    BounceOutLerp(Vector3, Vector3, float, float)

    Performs a bounce-out interpolation between two Vector3 values. The interpolation creates a bounce effect towards the end.

    Declaration
    public static Vector3 BounceOutLerp(Vector3 start, Vector3 end, float t, float speed = 1)
    Parameters
    Type Name Description
    Vector3 start

    Starting Vector3 value.

    Vector3 end

    Ending Vector3 value.

    float t

    Interpolation factor, typically between 0 and 1.

    float speed

    Speed factor of the bounce effect. Default is 1.

    Returns
    Type Description
    Vector3

    The interpolated Vector3 result.

    SingleBounceOutLerp(float, float, float, float)

    Performs a single bounce-out interpolation between two float values. The interpolation creates a bounce effect towards the end.

    Declaration
    public static float SingleBounceOutLerp(float start, float end, float t, float speed = 1)
    Parameters
    Type Name Description
    float start

    Starting float value.

    float end

    Ending float value.

    float t

    Interpolation factor, typically between 0 and 1.

    float speed

    Speed factor of the bounce effect. Default is 1.

    Returns
    Type Description
    float

    The interpolated float result.

    SingleBounceOutLerp(in float3, in float3, float, out float3, float)

    Performs a single bounce-out interpolation between two float3 values. The interpolation creates a bounce effect towards the end.

    Declaration
    public static void SingleBounceOutLerp(in float3 start, in float3 end, float t, out float3 result, float speed = 1)
    Parameters
    Type Name Description
    float3 start

    Starting float3 value.

    float3 end

    Ending float3 value.

    float t

    Interpolation factor, typically between 0 and 1.

    float3 result

    The interpolated float3 result.

    float speed

    Speed factor of the bounce effect. Default is 1.

    SingleBounceOutLerp(Vector3, Vector3, float, float)

    Performs a single bounce-out interpolation between two Vector3 values. The interpolation creates a bounce effect towards the end.

    Declaration
    public static Vector3 SingleBounceOutLerp(Vector3 start, Vector3 end, float t, float speed = 1)
    Parameters
    Type Name Description
    Vector3 start

    Starting Vector3 value.

    Vector3 end

    Ending Vector3 value.

    float t

    Interpolation factor, typically between 0 and 1.

    float speed

    Speed factor of the bounce effect. Default is 1.

    Returns
    Type Description
    Vector3

    The interpolated Vector3 result.

    In This Article
    Back to top
    Copyright © 2025 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)