mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 19:10:32 +00:00
fix(PredictedRigidbody): increase default motion smoothing angular velocity threshold
This commit is contained in:
parent
c6158acbc2
commit
41c811afa8
@ -35,7 +35,7 @@ public class PredictedRigidbody : NetworkBehaviour
|
|||||||
[Tooltip("Smoothing via Ghost-following only happens on demand, while moving with a minimum velocity.")]
|
[Tooltip("Smoothing via Ghost-following only happens on demand, while moving with a minimum velocity.")]
|
||||||
public float motionSmoothingVelocityThreshold = 0.1f;
|
public float motionSmoothingVelocityThreshold = 0.1f;
|
||||||
float motionSmoothingVelocityThresholdSqr; // ² cached in Awake
|
float motionSmoothingVelocityThresholdSqr; // ² cached in Awake
|
||||||
public float motionSmoothingAngularVelocityThreshold = 0.1f;
|
public float motionSmoothingAngularVelocityThreshold = 5.0f; // Billiards demo: 0.1 is way too small, takes forever for IsMoving()==false
|
||||||
float motionSmoothingAngularVelocityThresholdSqr; // ² cached in Awake
|
float motionSmoothingAngularVelocityThresholdSqr; // ² cached in Awake
|
||||||
public float motionSmoothingTimeTolerance = 0.5f;
|
public float motionSmoothingTimeTolerance = 0.5f;
|
||||||
double motionSmoothingLastMovedTime;
|
double motionSmoothingLastMovedTime;
|
||||||
@ -581,8 +581,8 @@ void RecordState()
|
|||||||
protected virtual void OnSnappedIntoPlace() {}
|
protected virtual void OnSnappedIntoPlace() {}
|
||||||
protected virtual void OnBeforeApplyState() {}
|
protected virtual void OnBeforeApplyState() {}
|
||||||
protected virtual void OnCorrected() {}
|
protected virtual void OnCorrected() {}
|
||||||
protected virtual void OnBeginPrediction() {} // when the Rigidbody moved above threshold and we created a ghost
|
protected virtual void OnBeginPrediction() => Debug.LogWarning($"BEGIN: {name}"); // when the Rigidbody moved above threshold and we created a ghost
|
||||||
protected virtual void OnEndPrediction() {} // when the Rigidbody came to rest and we destroyed the ghost
|
protected virtual void OnEndPrediction() => Debug.LogWarning($"END: {name}"); // when the Rigidbody came to rest and we destroyed the ghost
|
||||||
|
|
||||||
void ApplyState(double timestamp, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 angularVelocity)
|
void ApplyState(double timestamp, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 angularVelocity)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ MonoBehaviour:
|
|||||||
syncInterval: 0
|
syncInterval: 0
|
||||||
predictedRigidbody: {fileID: -177125271246800426}
|
predictedRigidbody: {fileID: -177125271246800426}
|
||||||
motionSmoothingVelocityThreshold: 0.1
|
motionSmoothingVelocityThreshold: 0.1
|
||||||
motionSmoothingAngularVelocityThreshold: 0.1
|
motionSmoothingAngularVelocityThreshold: 5
|
||||||
motionSmoothingTimeTolerance: 0.5
|
motionSmoothingTimeTolerance: 0.5
|
||||||
stateHistoryLimit: 32
|
stateHistoryLimit: 32
|
||||||
recordInterval: 0.05
|
recordInterval: 0.05
|
||||||
|
@ -302,7 +302,7 @@ MonoBehaviour:
|
|||||||
syncInterval: 0
|
syncInterval: 0
|
||||||
predictedRigidbody: {fileID: 1848203816128897140}
|
predictedRigidbody: {fileID: 1848203816128897140}
|
||||||
motionSmoothingVelocityThreshold: 0.1
|
motionSmoothingVelocityThreshold: 0.1
|
||||||
motionSmoothingAngularVelocityThreshold: 0.1
|
motionSmoothingAngularVelocityThreshold: 5
|
||||||
motionSmoothingTimeTolerance: 0.5
|
motionSmoothingTimeTolerance: 0.5
|
||||||
stateHistoryLimit: 32
|
stateHistoryLimit: 32
|
||||||
recordInterval: 0.05
|
recordInterval: 0.05
|
||||||
|
Loading…
Reference in New Issue
Block a user