advanced-input

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

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/stom66/dcl-bowling --skill advanced-input-stom66
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: advanced-input
Source: https://github.com/stom66/dcl-bowling/tree/main/agent/skills/advanced-input
Command: npx skills add https://github.com/stom66/dcl-bowling --skill advanced-input-stom66

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 for movement, freezing the player during cutscenes, FPS-style cursor lock, reading the cursor ray into the 3D world, and customizing the mobile on-screen joystick and buttons. This Skill provides verified patterns for all of these system-level input scenarios in SDK 7. ## Core Features & Use Cases - Input polling with inputSystem: Use isTriggered for one-shot actions and isPressed for held keys, plus getInputCommand for per-entity clicks with hit data and IA_ANY wildcard matching. - Pointer lock and cursor ray: Detect and request PointerLock state, and read PrimaryPointerInfo (screenCoordinates, screenDelta, worldRayDirection) for mouselook and camera raycasts. - Movement restriction with InputModifier: Freeze or selectively disable walk, run, jump, and emotes for cutscenes (desktop client only). - Mobile touch controls: Configure TouchScreenControls (SDK 7.26.0+) to hide the joystick or crosshair, rebind the central button, and set custom button icons. - Use Case: Build a fixed-camera bowling minigame where WASD drives a custom entity, the avatar is frozen via InputModifier, and mobile players see a decluttered custom touch UI. ## Quick Start Ask the AI to add a system that polls WASD keys with inputSystem.isPressed to move a custom entity while freezing the player avatar with InputModifier.

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 every frame in a Decentraland scene?▼

Use inputSystem.isPressed(InputAction.IA_FORWARD) inside a system registered with engine.addSystem for continuous held-key checks, or inputSystem.isTriggered with PointerEventType.PET_DOWN for one-shot key presses. Both work globally without targeting an entity.

How do I freeze player movement during a cutscene in Decentraland?▼

Call InputModifier.create on engine.PlayerEntity with mode InputModifier.Mode.Standard({ disableAll: true }), then restore movement with InputModifier.deleteFrom. Note this only works in the DCL 2.0 desktop client, not the web browser explorer.

What is the difference between isTriggered and isPressed in inputSystem?▼

isTriggered returns true only on the frame a key is first pressed, suiting one-shot actions like firing a weapon. isPressed returns true every frame while the key is held, suiting continuous actions like movement.

Can I hide the mobile joystick and on-screen buttons in Decentraland?▼

Yes, on SDK 7.26.0+ the TouchScreenControls component on engine.RootEntity hides the joystick, crosshair, or individual gamepad buttons, and can rebind the central button or set custom icons. It is a no-op on desktop.

Why does my mouse look code stop working when the pointer is locked?▼

PrimaryPointerInfo.screenCoordinates and worldRayDirection freeze at screen center during pointer lock. Use screenDelta instead, which keeps reporting raw mouse movement while locked and is the correct input for mouselook camera controls.

When should I use inputSystem instead of pointerEventsSystem click handlers?▼

Use pointerEventsSystem.onPointerDown for simple entity clicks and hover. Use inputSystem when you need multi-key combos, continuous polling, global key checks regardless of cursor target, or hit data via getInputCommand.