Struct PositionPredictor
This is a utility to implement position predicting.
Inherited Members
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. |