add-interactivity

Implements pointer events, proximity interactions, trigger areas, and raycasting for Decentraland SDK7 entities.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/ansonj-dev/neon-reverse --skill add-interactivity-ansonj-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-interactivity
Source: https://github.com/ansonj-dev/neon-reverse/tree/main/agent/skills/add-interactivity
Command: npx skills add https://github.com/ansonj-dev/neon-reverse --skill add-interactivity-ansonj-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dcl/sdk, and includes references (resource) components.

What problem does it solve? Adding click, hover, proximity, and zone-based interactions to Decentraland SDK7 scenes involves subtle API rules — collider layer requirements, avatar-versus-camera distance measurement, handler re-registration bugs, and trigger callback field naming — that commonly cause interactions to silently fail. ## Core Features & Use Cases - Pointer and Proximity Events: Register click, hover, and nearby-button-press handlers on entities with correct collider setup, distance options, and priority resolution. - Trigger Areas and Raycasting: Detect players entering zones with the TriggerArea component and cast rays in four direction modes for hit detection. - Pitfall Prevention: Documents verified fixes for thin trigger volumes, skinned-mesh clickability, handler re-registration loops, and overlapping zone state. - Use Case: A builder wants a door that opens when a player presses E nearby and a pressure plate that fires when stepped on; this Skill provides the exact proximity handler and tall invisible TriggerArea pattern to make both work. ## Quick Start Add a click handler with hover text to the door entity in my Decentraland scene so players can open it.

Frequently Asked Questions about add-interactivity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an entity clickable in Decentraland SDK7?

Use pointerEventsSystem.onPointerDown with a hoverText and maxDistance option. The entity needs a collider on the CL_POINTER layer, such as MeshCollider.setBox(entity) or visibleMeshesCollisionMask on a GltfContainer.

How do I detect when a player enters an area in Decentraland?

Create an entity with TriggerArea.setBox or setSphere and size it via Transform.scale, then use triggerAreaEventsSystem.onTriggerEnter. Filter to the local player by checking result.trigger?.entity against engine.PlayerEntity.

What is the difference between pointer events and proximity events in Decentraland?

Pointer events require aiming the cursor at the entity, while proximity events fire when the player is nearby and roughly facing the entity without aiming. Pointer interactions always take priority, and proximity range is effectively limited to about 3 meters by the explorer's broad phase.

Why is my Decentraland click handler not firing on a GLB model?

GltfContainer visible meshes are not clickable by default because visibleMeshesCollisionMask defaults to 0. Set it to ColliderLayer.CL_POINTER, or for skinned rigged models add an invisible child box collider parented to the entity.

Why does my trigger area never fire on a floor plate?

A thin slab trigger volume never overlaps the avatar capsule while standing on it. Keep the thin plate as the visual and add a separate invisible trigger box about 2 meters tall centered above it.

Does maxDistance measure from the camera or the avatar in Decentraland pointer events?

maxDistance measures from the avatar position, not the camera, with a default of 10 meters. Use maxCameraDistance only for camera-origin checks, and note it is ignored entirely on proximity events.