Skip to content

feat: PointerEvents max_camera_distance; max_distance is player distance - #470

Open
robtfm wants to merge 1 commit into
mainfrom
feat/pointer-events-max-camera-distance
Open

feat: PointerEvents max_camera_distance; max_distance is player distance#470
robtfm wants to merge 1 commit into
mainfrom
feat/pointer-events-max-camera-distance

Conversation

@robtfm

@robtfm robtfm commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

  • max_distance is now documented as player distance (distance from the avatar to the target). This matches what unity-explorer has measured since 2024 (avatar head in every mode except first-person, including under a scene VirtualCamera) and godot; only bevy implemented the "camera distance" wording. Changing the clients to match the old comment would break every deployed scene that uses maxDistance, so the comment changes instead.
  • max_player_distance is deprecated: it is an alias for max_distance. When both are present the larger is used.
  • New max_camera_distance = 8: the camera-origin check, for scenes that drive a virtual camera away from the avatar.

Combination rules (unchanged shape, roles swapped): only player → player check; only camera → camera check; both → OR; neither → player distance ≤ 10.

Context: Slack thread on maxDistance vs maxPlayerDistance; unity-explorer issue decentraland/unity-explorer#9320 (defaults applied before presence checks) is confirmed in code and means unity currently only ever runs the OR branch.

Client PRs: bevy-explorer (follows), js-sdk-toolchain (follows, pinned to this branch's artifact). Unity needs to add max_camera_distance support.

🤖 Generated with Claude Code

Document max_distance as the distance from the player (what unity and
godot have always measured, and what every deployed scene relies on),
deprecate max_player_distance as a same-meaning alias, and add
max_camera_distance for the camera-origin check that max_distance was
previously documented as.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test this pull request

  • The @dcl/protocol package can be tested in scenes by running
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-33189663741.commit-641dbdf.tgz"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant