From 22356c49cea8823fbdeb2431824c35302372bcc7 Mon Sep 17 00:00:00 2001 From: Jaedyn Draper Date: Wed, 13 Mar 2024 16:54:52 -0500 Subject: [PATCH] Renamed `AuthorityState` to `AuthoritativeState` for consistency. --- .../Assets/Scripts/PlayerMovableObject.cs | 8 ++++---- .../Anticipation Sample/Packages/packages-lock.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Experimental/Anticipation Sample/Assets/Scripts/PlayerMovableObject.cs b/Experimental/Anticipation Sample/Assets/Scripts/PlayerMovableObject.cs index 211b704e..3b12f824 100644 --- a/Experimental/Anticipation Sample/Assets/Scripts/PlayerMovableObject.cs +++ b/Experimental/Anticipation Sample/Assets/Scripts/PlayerMovableObject.cs @@ -182,16 +182,16 @@ namespace DefaultNamespace // just reuse the same method here with no problem. Move(inputs); // Server can use Smoothing for interpolation purposes as well. - MyTransform.Smooth(currentPosition, MyTransform.AuthorityState, SmoothTime); + MyTransform.Smooth(currentPosition, MyTransform.AuthoritativeState, SmoothTime); } public void Update() { // The "ghost transform" here is a little smaller player object that shows the current authority position, // which is a few frames behind our anticipated value. This helps render the difference. - GhostTrasform.position = MyTransform.AuthorityState.Position; - GhostTrasform.rotation = MyTransform.AuthorityState.Rotation; - GhostTrasform.localScale = MyTransform.AuthorityState.Scale * 0.75f; + GhostTrasform.position = MyTransform.AuthoritativeState.Position; + GhostTrasform.rotation = MyTransform.AuthoritativeState.Rotation; + GhostTrasform.localScale = MyTransform.AuthoritativeState.Scale * 0.75f; } // Input processing happens in FixedUpdate rather than Update because the frame rate of server and client diff --git a/Experimental/Anticipation Sample/Packages/packages-lock.json b/Experimental/Anticipation Sample/Packages/packages-lock.json index e58d4e2b..8784ad6e 100644 --- a/Experimental/Anticipation Sample/Packages/packages-lock.json +++ b/Experimental/Anticipation Sample/Packages/packages-lock.json @@ -94,7 +94,7 @@ "com.unity.nuget.mono-cecil": "1.10.1", "com.unity.transport": "1.4.0" }, - "hash": "ef792ef4177a4ca5efde322d3adbf79cd68b6ba5" + "hash": "227a33222f0b796c37fbdcab2641592f5310301b" }, "com.unity.nuget.mono-cecil": { "version": "1.10.1",