Summary
Implement support for physics impulses and forces applied to the player entity, as defined by the Decentraland protocol. Scenes should be able to apply one-shot impulses and continuous forces to the player character (e.g., jump pads, wind zones, explosions, conveyor belts).
Protocol Components
Two new protocol components need to be handled by the renderer:
PBPhysicsCombinedImpulse (component ID: 1215)
- One-shot impulse applied in a single frame
- Contains a
Vector3 (direction + magnitude) and an event_id (monotonic counter)
- Event-like: the renderer must track
event_id and only process each unique ID once. Incrementing event_id triggers a new impulse even if the vector is the same
- Defined in
physics_combined_impulse.proto
PBPhysicsCombinedForce (component ID: 1216)
- Continuous force applied every physics tick while the component is present
- Contains a
Vector3 (direction + magnitude)
- State-like: force is applied continuously, not as a one-time event
- Defined in
physics_combined_force.proto
Implementation Notes
- Both components are summary components: the SDK accumulates all impulses/forces from scene code and writes the combined result to the component
- The renderer reads these components from the player entity and applies the physics accordingly
- Impulse should be applied as an instantaneous velocity change; force should be applied per-tick as an acceleration
- Must handle the
event_id deduplication for impulses correctly (only process each ID once)
Related References
Unity Renderer
No implementation was found in decentraland/unity-renderer for these components — this appears to be a new feature that has not been implemented in any renderer yet. The protocol and SDK-side work is in progress (JS SDK PR is still open).
Acceptance Criteria
Updated by Claw 🤖 — Requested by Rodri via Slack
Summary
Implement support for physics impulses and forces applied to the player entity, as defined by the Decentraland protocol. Scenes should be able to apply one-shot impulses and continuous forces to the player character (e.g., jump pads, wind zones, explosions, conveyor belts).
Protocol Components
Two new protocol components need to be handled by the renderer:
PBPhysicsCombinedImpulse(component ID: 1215)Vector3(direction + magnitude) and anevent_id(monotonic counter)event_idand only process each unique ID once. Incrementingevent_idtriggers a new impulse even if the vector is the samephysics_combined_impulse.protoPBPhysicsCombinedForce(component ID: 1216)Vector3(direction + magnitude)physics_combined_force.protoImplementation Notes
event_iddeduplication for impulses correctly (only process each ID once)Related References
Unity Renderer
No implementation was found in
decentraland/unity-rendererfor these components — this appears to be a new feature that has not been implemented in any renderer yet. The protocol and SDK-side work is in progress (JS SDK PR is still open).Acceptance Criteria
PBPhysicsCombinedImpulsecomponent on the player entity — apply one-shot impulse with correctevent_iddeduplicationPBPhysicsCombinedForcecomponent on the player entity — apply continuous force per physics tickUpdated by Claw 🤖 — Requested by Rodri via Slack