From 717ada89424736d9e054657a5e10f2a9c596c3ac Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Mon, 15 Apr 2024 17:14:04 +0200 Subject: [PATCH] Pose sync is working (tested host->client and client->host) --- .../Prefabs/Networking/Resources/HumanoidPlayer.prefab | 2 +- .../Scripts/Networking/Netcode/HumanoidPlayerNetcode.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Runtime/HumanoidControl/Prefabs/Networking/Resources/HumanoidPlayer.prefab b/Runtime/HumanoidControl/Prefabs/Networking/Resources/HumanoidPlayer.prefab index 0531ea3..d2e4210 100644 --- a/Runtime/HumanoidControl/Prefabs/Networking/Resources/HumanoidPlayer.prefab +++ b/Runtime/HumanoidControl/Prefabs/Networking/Resources/HumanoidPlayer.prefab @@ -69,6 +69,6 @@ MonoBehaviour: _syncFingerSwing: 0 _syncFace: 0 _syncTracking: 0 - _debug: 1 + _debug: 0 _sendRate: 25 _createLocalRemotes: 0 diff --git a/Runtime/HumanoidControl/Scripts/Networking/Netcode/HumanoidPlayerNetcode.cs b/Runtime/HumanoidControl/Scripts/Networking/Netcode/HumanoidPlayerNetcode.cs index 36e28dc..3bceb28 100644 --- a/Runtime/HumanoidControl/Scripts/Networking/Netcode/HumanoidPlayerNetcode.cs +++ b/Runtime/HumanoidControl/Scripts/Networking/Netcode/HumanoidPlayerNetcode.cs @@ -265,8 +265,6 @@ namespace Passer.Humanoid { if (humanoid.gameObject != null) Destroy(humanoid.gameObject); } - else - humanoid.nwId = 0; } } @@ -409,7 +407,7 @@ namespace Passer.Humanoid { ReceiveHumanoidPoseRpc(data); } - [Rpc(SendTo.NotServer)] + [Rpc(SendTo.NotOwner)] protected virtual void ReceiveHumanoidPoseRpc(byte[] data) { this.ReceiveHumanoidPose(data); }