mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
kinematic blending
This commit is contained in:
parent
04016bdab4
commit
5740cbc09f
@ -225,6 +225,10 @@ protected void BeginPredicting()
|
||||
Quaternion predictionEndRotation = Quaternion.identity;
|
||||
protected void BeginBlending()
|
||||
{
|
||||
// blending interpolates from prediction to expected transform sync.
|
||||
// this can be done entirely in memory, without physics.
|
||||
predictedRigidbody.isKinematic = true;
|
||||
|
||||
state = ForecastState.BLENDING;
|
||||
// if (debugColors) rend.material.color = blendingAheadColor; set in update depending on ahead/behind
|
||||
|
||||
@ -248,7 +252,6 @@ protected void BeginBlending()
|
||||
|
||||
protected void BeginFollowing()
|
||||
{
|
||||
predictedRigidbody.isKinematic = true; // full transform sync
|
||||
state = ForecastState.FOLLOWING;
|
||||
if (debugColors) rend.material.color = originalColor;
|
||||
// reset the collision chain depth so it starts at 0 again next time
|
||||
|
Loading…
Reference in New Issue
Block a user