Skip to content

Conversation

@daniele-dcl
Copy link
Contributor

@daniele-dcl daniele-dcl commented Dec 4, 2025

Pull Request Description

Implementation of the head sync shape: https://www.notion.so/decentraland/Head-Sync-2735f41146a580d49421f7939a81aa2e

Basically we just sync head look-at vector across clients, so now we can see where other players are looking at.

Protocol PR: decentraland/protocol#326

Test Instructions

Can be tested anywhere, requires 2+ players.

  • Head movement should be synced across clients
  • Special case: head movement is disabled during emotes, that should also be the case for remote players. That is, say a player is looking up, then it plays an emote. You will see the head of the avatar stops pointing straight up, instead it just follows the natural movement of the emote. The same should be observed for other players
  • Same applies to:
    • Player not being grounded
    • Player standing on a steep slope. A steep slope should be one that makes the avatar slide
    • Player being stunned (to my knowledge that only happens after a long fall)
    • Apparently also when standing on a moving platform (not sure why, but that's how the code works at the moment)

Some of the above conditions might be problematic to test. I personally think emotes are the most important to test because if we don't correctly disable head IK during emotes playback, it will look pretty weird.

Also in the settings there's a new option to disable head-sync. When head-sync is disabled other players should NOT see the head movement of the player who has it disabled.

Dev Notes

  • Added a new int32 field in the protocol to send the look at data across the netowork
    • 1 bit for the enabled falg
    • 6 bits for yaw
    • 6 bits for pitch
    • Extra bits reserved for the 2nd part of the shape (avatar arm pointing at things)
  • Extended IK system to handle remote players
  • Enabled the RigBuilder component on remote players. This might impact performance? It was disabled before
  • Notice in the system handling received network messages, we do NOT interpolate the IK angles like we do for the player position. This is because the IK logic already perform interpolation internally (see ApplyHeadLookAt.Execute)

@daniele-dcl daniele-dcl self-assigned this Dec 4, 2025
@daniele-dcl daniele-dcl requested review from a team as code owners December 4, 2025 10:43
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

@Ludmilafantaniella Ludmilafantaniella requested review from Ludmilafantaniella and removed request for DafGreco December 4, 2025 12:11
# Conflicts:
#	Explorer/Assets/DCL/Character/CharacterMotion/Systems/HeadIKSystem.cs
#	Explorer/Assets/DCL/Multiplayer/Movement/Systems/RemotePlayersMovementSystem.cs
#	Explorer/Assets/Protocol/DecentralandProtocol/Comms.gen.cs
#	scripts/package-lock.json
#	scripts/package.json
Copy link
Contributor

@Ludmilafantaniella Ludmilafantaniella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Approved
Tested and verified on Windows and macOS following the testing sheet and PR indications.

Coverage:

  • Minigames: Head sync behaves correctly, no head sync breakage observed.

  • Scenes with forced POV (e.g. MetadyneLabs): no issues, head sync does not break.

  • Emotes: When triggering an emote while head sync is active and held in a specific position, head sync is correctly disabled and the emote plays as expected.

  • Moving platforms / elevators: Head sync remains stable.

  • Cross-OS testing (Windows ↔ macOS): Head sync works correctly across clients.

  • Additional coverage & regression testing:

    • Head sync tested across multiple scenes, under different circumstances and movement types.
    • Regression testing performed on Backpack preview (emotes and wearables).
    • User Profile functionality verified.
    • Testing executed in Genesis Plaza V2, covering all available interactions in that environment.

No blocking issues found.
PR looks good to merge 👍

emote-headSync.mp4
Moving.plattforms.mp4
73586329-3ded-45f4-8ba0-fe03fce92c83-1765553708 8ed3bca6-add4-4c85-84b4-21b43252df28-1765554272 c7bf26a8-6a9d-4426-8bf4-da80545c3674-1765553812 d14a5aaf-f197-4bba-9ac4-009a55058207-1765553817 6ade5d9b-220a-416b-87d0-0a676b5d9010-1765553784

@daniele-dcl daniele-dcl added the shape-up It has been shaped and is awaiting the cycle. label Dec 17, 2025
# Conflicts:
#	Explorer/Assets/Protocol/DecentralandProtocol/AudioAnalysis.gen.cs.meta
# Conflicts:
#	Explorer/Assets/DCL/Character/CharacterMotion/CharacterMotion.asmdef
#	Explorer/Assets/DCL/Character/CharacterMotion/Settings/CharacterControllerSettings.cs
# Conflicts:
#	Explorer/Assets/DCL/Character/CharacterMotion/Systems/HeadIKSystem.cs
#	Explorer/Assets/DCL/FeatureFlags/FeaturesRegistry.cs
#	Explorer/Assets/DCL/Prefs/DCLPrefKeys.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shape-up It has been shaped and is awaiting the cycle.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants