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