ITADN

Implement non-pointer (proximity) interactions for PointerEvents

#759Openrobtfm 创建于 2026-05-05
protocol/sdkphase-4
R
robtfmcommented
## Summary Protocol PR [decentraland/protocol#353](https://github.com/decentraland/protocol/pull/353) (merged Mar 2026) extends `PBPointerEvents` with non-pointer (proximity) interaction support. The proto definitions are now in tree (PR #758) but none of the runtime behavior is implemented. ## Missing functionality 1. **`PET_PROXIMITY_ENTER` / `PET_PROXIMITY_LEAVE` event types** — distance-triggered events that fire when the avatar enters/leaves the configured range of a target, independent of camera ray direction. 2. **`Entry.interaction_type` (`InteractionType` enum: `CURSOR` / `PROXIMITY`)** — routes the entry through either the existing cursor-ray pipeline or a new proximity pipeline. `CURSOR` (default 0) preserves current behavior. 3. **`Info.priority` (uint32, default 0)** — resolution order when multiple events overlap. Higher value wins. Affects which event consumes the input when several entries on different entities are in range simultaneously. ## References - Protocol PR: https://github.com/decentraland/protocol/pull/353 (merged into protocol-squad as #362) - Unity reference implementation: `Explorer/Assets/DCL/Interaction/Systems/PlayerOriginatedProximitySystem.cs` and `ProcessPointerEventsSystem.cs` (the `interactionType == InteractionType.Cursor` branch in the per-entry loop) - Proto sync into bevy-explorer: #758 ## Notes These three features are coupled — `PET_PROXIMITY_*` events are only meaningful when paired with `interaction_type = PROXIMITY`, and `priority` was added in the same protocol PR specifically to deconflict overlap that the new proximity events introduce. Should be implemented together.
0 条评论