advanced-input

Implements input polling, pointer lock, movement restriction, and mobile touch controls in Decentraland SDK7 scenes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Decentraland scenes often need more than simple click handlers: continuous key polling, WASD-driven entities, freezing the player during cutscenes, FPS-style cursor lock, and control over the mobile client's on-screen joystick and buttons. This Skill provides verified patterns and API references for those system-level input tasks in Decentraland SDK7. ## Core Features & Use Cases - Input polling with inputSystem: Use isTriggered for one-shot actions and isPressed for held keys, with per-entity getInputCommand queries and a corrected pattern for reading root-entity input. - Pointer lock and cursor data: Detect and request PointerLock state, and read PrimaryPointerInfo screen coordinates, deltas, and world ray direction for mouselook and raycast patterns. - Movement restriction and mobile controls: Freeze or constrain the player with InputModifier, detect the platform with isMobile, and configure the native TouchScreenControls joystick, crosshair, and gamepad buttons. - Use Case: A creator building a mobile-first multiplayer scene hides the native joystick, re-binds the central touch button to IA_PRIMARY, freezes the avatar during an intro cutscene, and polls WASD keys to drive a custom camera entity. ## Quick Start Ask the assistant to add WASD-controlled movement for a custom entity and freeze the player avatar during a cutscene in your Decentraland SDK7 scene.

Frequently Asked Questions about advanced-input

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

FAQPage Schema
How do I poll keyboard input in a Decentraland SDK7 scene?

Use inputSystem.isTriggered for one-shot key presses and inputSystem.isPressed for keys held down, called inside a system registered with engine.addSystem. Pass an InputAction such as IA_PRIMARY for the E key or IA_FORWARD for W.

How do I freeze the player during a cutscene in Decentraland?

Create an InputModifier component on engine.PlayerEntity with mode Standard and disableAll set to true, then call InputModifier.deleteFrom to restore movement. Note this only works in the DCL 2.0 desktop client, not the web browser explorer.

Can I hide or customize the mobile joystick and buttons in Decentraland?

Yes, on SDK 7.26.0+ the TouchScreenControls component on engine.RootEntity hides the joystick, crosshair, or individual gamepad buttons, re-binds the central button, and swaps button glyphs for scene images. It is a safe no-op on desktop.

Why does getInputCommand without an entity not give global input?

Omitting the entity argument reads commands aggregated from every entity in the scene, not a scene-root target, and engine.RootEntity is falsy so it takes the same branch. To read genuine root-entity input, iterate PointerEventsResult on the root entity with a timestamp watermark.

How do I read mouse movement while the cursor is locked in Decentraland?

Read PrimaryPointerInfo.screenDelta from engine.RootEntity, which keeps reporting raw mouse movement during pointer lock while screenCoordinates and worldRayDirection freeze at screen center. This is the correct input for mouselook camera controls.

What are the limitations of TouchScreenControls on mobile?

TouchScreenControls only covers the native input controls, not the client HUD like chat or minimap, and button positions are fixed so scenes only choose visibility and the leading button. Hiding the joystick removes the only native way to walk, so a replacement UI is required.