Interpolator provides a set of methods to get the "from" and "to" ticks of the associated [Networked] property, as well as the current interpolation value for the two, but it also provides a Value property as a shortcut to get the actual interpolated value for those parameters.
- See also
- RawInterpolator
More...
|
T T float? alpha | GetValues (bool? force=null) |
|
delegate T | InterpDelegate (int *from, int *to, float t, float a) |
|
| Interpolator (NetworkBehaviour behaviour, InterpDelegate interpDelegate, ReadDelegate readDelegate, int offset, Accuracy accuracy) |
|
delegate T | ReadDelegate (int *ptr, float a) |
|
bool | TryGetValues (out T from, out T to, out float alpha, bool? force=null) |
| Try and get 'To' and 'From' states, and the Alpha (t) values needed for interpolation. More...
|
|
|
float | _accuracy |
|
NetworkBehaviour | _behaviour |
|
InterpDelegate | _interpDelegate |
|
int | _offset |
|
ReadDelegate | _readDelegate |
|
T | from |
| Get 'To' and 'From' states, and the Alpha (t) values needed for interpolation. More...
|
|
T T | to |
|
|
NetworkBehaviour | Behaviour [get] |
|
InterpDelegate | InterpolationDelegate [get, set] |
|
int | Offset [get] |
|
ReadDelegate | ReaderDelegate [get] |
|
T? | TryValue [get] |
| Get the current interpolation value for this Interpolator. Similar to the Value property, but will return null if interpolation data is not available. More...
|
|
T | Value [get] |
| Get the current interpolation value for this Interpolator. This method will silently ignore missing interpolation data and just return the default value for T More...
|
|
Interpolator provides a set of methods to get the "from" and "to" ticks of the associated [Networked] property, as well as the current interpolation value for the two, but it also provides a Value property as a shortcut to get the actual interpolated value for those parameters.
- See also
- RawInterpolator
◆ TryGetValues()
bool TryGetValues |
( |
out T |
from, |
|
|
out T |
to, |
|
|
out float |
alpha, |
|
|
bool? |
force = null |
|
) |
| |
Try and get 'To' and 'From' states, and the Alpha (t) values needed for interpolation.
- Parameters
-
from | Value on the state the interpolation is going from. |
to | Value on the state the interpolation is going to. |
alpha | Interpolant factor between the two states. |
force | Force interpolation to the current Simulations time frame (as opposed to between snapshots). If no value is forced, interpolation data will be retrieved according to the NetworkBehaviour.InterpolationDataSource. |
- Returns
- True if the interpolation data is available, false otherwise.
◆ from
Get 'To' and 'From' states, and the Alpha (t) values needed for interpolation.
- Parameters
-
- Returns
- A tuple containing the values. Null if interpolation data is not available.
◆ TryValue
Get the current interpolation value for this Interpolator. Similar to the Value
property, but will return null if interpolation data is not available.
◆ Value
Get the current interpolation value for this Interpolator. This method will silently ignore missing interpolation data and just return the default value for T