mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
blend over rtt
This commit is contained in:
parent
6c0c03ccdc
commit
0e3af6694c
@ -33,8 +33,9 @@ public class ForecastRigidbody : NetworkBehaviour
|
||||
Vector3 lastPosition;
|
||||
|
||||
[Header("Blending")]
|
||||
[Tooltip("Blend to remote state over this period of time, accelerating the blending exponentially.")]
|
||||
public float blendingTime = 0.500f;
|
||||
[Tooltip("Blend to remote state over a N * rtt time.\n For a 200ms ping, we blend over N * 200ms.\n For 20ms ping, we blend over N * 20 ms.")]
|
||||
public float blendingRttMultiplier = 3;
|
||||
public float blendingTime => (float)NetworkTime.rtt * blendingRttMultiplier;
|
||||
[Tooltip("Blending speed over time from 0 to 1. Exponential is recommended.")]
|
||||
public AnimationCurve blendingCurve = AnimationCurve.EaseInOut(0, 0, 1, 1);
|
||||
ForecastState state = ForecastState.FOLLOWING; // follow until the player interacts
|
||||
|
Loading…
Reference in New Issue
Block a user