diff --git a/Assets/Mirror/Examples/Shooter/Scripts/PlayerWeapon.cs b/Assets/Mirror/Examples/Shooter/Scripts/PlayerWeapon.cs index 24d9ed724..dfd14ae46 100644 --- a/Assets/Mirror/Examples/Shooter/Scripts/PlayerWeapon.cs +++ b/Assets/Mirror/Examples/Shooter/Scripts/PlayerWeapon.cs @@ -67,7 +67,8 @@ void FireWeapon() { // prediction: apply bullet force locally and send command to server ApplyBulletForce(rigid, hit.normal, weapon.impactForce); - if (!isServer) CmdApplyBulletForce(predictedPhysics.target, hit.normal, weapon.impactForce); // not in host mode + PredictedRigidbody target = predictedPhysics.target.GetComponent(); + if (!isServer) CmdApplyBulletForce(target, hit.normal, weapon.impactForce); // not in host mode } } }