fix stacked

This commit is contained in:
mischa 2024-04-04 00:20:23 +08:00
parent 9d8bb6b2be
commit 12300a1472

View File

@ -26,7 +26,7 @@ void Update()
// apply force in a random direction, this looks best // apply force in a random direction, this looks best
Debug.Log($"Applying force to: {hit.collider.name}"); Debug.Log($"Applying force to: {hit.collider.name}");
Vector3 impulse = Random.insideUnitSphere * force; Vector3 impulse = Random.insideUnitSphere * force;
predicted.predictedRigidbody.AddForce(impulse, ForceMode.Impulse); predicted.AddPredictedForce(impulse, ForceMode.Impulse);
CmdApplyForce(predicted.netIdentity, impulse); CmdApplyForce(predicted.netIdentity, impulse);
} }
} }