mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
transition to FOLLOWING
This commit is contained in:
parent
785aa036a3
commit
15452d1f9b
@ -135,7 +135,7 @@ protected void BeginBlending()
|
|||||||
Debug.Log($"{name} BEGIN BLENDING");
|
Debug.Log($"{name} BEGIN BLENDING");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BeginFollow()
|
protected void BeginFollowing()
|
||||||
{
|
{
|
||||||
predictedRigidbody.isKinematic = true; // full transform sync
|
predictedRigidbody.isKinematic = true; // full transform sync
|
||||||
state = ForecastState.FOLLOWING;
|
state = ForecastState.FOLLOWING;
|
||||||
@ -272,6 +272,13 @@ void FixedUpdateClient()
|
|||||||
// assign rigidbody position & rotation while keeping velocity to keep moving
|
// assign rigidbody position & rotation while keeping velocity to keep moving
|
||||||
predictedRigidbody.MovePosition(newPosition);
|
predictedRigidbody.MovePosition(newPosition);
|
||||||
predictedRigidbody.MoveRotation(newRotation);
|
predictedRigidbody.MoveRotation(newRotation);
|
||||||
|
|
||||||
|
// transition to FOLLOWING once p = 100%
|
||||||
|
if (p >= 1)
|
||||||
|
{
|
||||||
|
Debug.Log($"{name} END BLENDING");
|
||||||
|
BeginFollowing();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (state == ForecastState.FOLLOWING)
|
else if (state == ForecastState.FOLLOWING)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user