docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PositionPredictor

    This is a utility to implement position predicting.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Cinemachine
    Assembly: solution.dll
    Syntax
    public struct PositionPredictor

    Fields

    Name Description
    Smoothing

    How much to smooth the predicted result. Must be >= 0, roughly corresponds to smoothing time.

    Properties

    Name Description
    CurrentPosition

    Get the current position of the tracked object, as set by the last call to AddPosition(). This is only valid if IsEmpty returns false.

    IsEmpty

    Have any positions been logged for smoothing?

    Methods

    Name Description
    AddPosition(Vector3, float)

    Add a new target position to the history buffer

    ApplyTransformDelta(Vector3)

    Apply a delta to the target's position, which will be ignored for smoothing purposes. Use this when the target's position gets warped.

    PredictPositionDelta(float)

    Predict the target's position change over a given time from now

    Reset()

    Reset the lookahead data, clear all the buffers.

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