From fcea3ce9d4c34a618a5da1bee596ffc8fea8da23 Mon Sep 17 00:00:00 2001 From: mischa Date: Fri, 2 Feb 2024 09:07:31 +0100 Subject: [PATCH] Prediction: expose physics copy components to inheriting classes --- .../Components/PredictedRigidbody/PredictedRigidbody.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs b/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs index 1fe41bfa0..9e0f9b205 100644 --- a/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs +++ b/Assets/Mirror/Components/PredictedRigidbody/PredictedRigidbody.cs @@ -87,9 +87,9 @@ public class PredictedRigidbody : NetworkBehaviour // Rigidbody & Collider are moved out into a separate object. // this way the visual object can smoothly follow. protected GameObject physicsCopy; - Transform physicsCopyTransform; // caching to avoid GetComponent - Rigidbody physicsCopyRigidbody; // caching to avoid GetComponent - Collider physicsCopyCollider; // caching to avoid GetComponent + protected Transform physicsCopyTransform; // caching to avoid GetComponent + protected Rigidbody physicsCopyRigidbody; // caching to avoid GetComponent + protected Collider physicsCopyCollider; // caching to avoid GetComponent float smoothFollowThreshold; // caching to avoid calculation in LateUpdate // we also create one extra ghost for the exact known server state.