mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix nre
This commit is contained in:
parent
693acc409f
commit
cd6e67a78e
@ -264,14 +264,16 @@ protected void BeginBlending()
|
||||
|
||||
protected void BeginFollowing()
|
||||
{
|
||||
predictedRigidbody.isKinematic = true; // full transform sync
|
||||
|
||||
// remove rigidbody until it's needed again later
|
||||
if (rigidbodyOnDemand)
|
||||
{
|
||||
rbConfig = new RigidbodyConfiguration(predictedRigidbody);
|
||||
Destroy(predictedRigidbody);
|
||||
}
|
||||
else
|
||||
{
|
||||
predictedRigidbody.isKinematic = true; // full transform sync
|
||||
}
|
||||
|
||||
state = ForecastState.FOLLOWING;
|
||||
#if UNITY_EDITOR // PERF: only access .material in Editor, as it may instantiate!
|
||||
|
Loading…
Reference in New Issue
Block a user