Sync per-pose index and locomotion state across the network

Add PlayerAnimationSync NetworkBehaviour with owner-authoritative
NetworkVariables for pose index and locomotion category (idle/walk/run/fall).
Remote avatars switch their PlayerPoseController into network-controlled mode,
skipping local input, sprint reset, capsule resize and camera framing, and
take pose index plus locomotion externally. Disable pose persistence on
network-driven remotes so foreign avatars can't overwrite the local save.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-06-27 14:44:11 +02:00
1 parent 4fa443f630
commit 7f2f4e5999
5 files changed
+186 -29

No files matched your search

+14
View File
@@ -48,6 +48,7 @@ GameObject:
- component: {fileID: 1557561356852236266}
- component: {fileID: 6847253018511389861}
- component: {fileID: 8574096554986372233}
- component: {fileID: 8646586982149381366}
m_Layer: 0
m_Name: Player
m_TagString: Player
@@ -296,6 +297,19 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NetworkPlayerSetup
ShowTopMostFoldoutHeaderGroup: 1
--- !u!114 &8646586982149381366
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5384024074013944205}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c52bb7282c319e4f8c1f956d17cbdca, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerAnimationSync
ShowTopMostFoldoutHeaderGroup: 1
--- !u!1 &6840099669803454162
GameObject:
m_ObjectHideFlags: 0