camera-control

Control camera modes, virtual cameras, and camera-collider interactions in Decentraland SDK scenes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Decentraland scene developers need to read camera state, force first or third person modes in specific areas, and build cinematic or spectate cameras, but the SDK's camera components (CameraMode, CameraModeArea, VirtualCamera, MainCamera) have non-obvious rules and gotchas that cause silent failures. ## Core Features & Use Cases - Camera State Reading: Poll camera position and rotation via engine.CameraEntity and detect first/third person mode with CameraMode and CameraMode.onChange. - Forced Camera Regions: Use CameraModeArea to force a camera mode when players enter a defined volume, with Creator Hub inspector support. - Cinematic and Spectate Cameras: Drive VirtualCamera entities with transitions, lookAt targets, FOV overrides, mouselook control, and full spectate-mode rigs with parcel-bounds clamping. - Use Case: Build a replay or observer mode for a multiplayer game where pressing a key switches the player into a free-roaming camera that follows other players while InputModifier freezes their avatar. ## Quick Start Ask the assistant to add a VirtualCamera cutscene that activates when the player enters a trigger area in your Decentraland scene.

Frequently Asked Questions about camera-control

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

FAQPage Schema
How do I create a cinematic camera in a Decentraland scene?▼

Create an entity with a Transform and VirtualCamera component, then activate it by setting MainCamera.createOrReplace(engine.CameraEntity, { virtualCameraEntity: yourEntity }). Use VirtualCamera.Transition.Speed or Transition.Time for smooth transitions, and set virtualCameraEntity back to undefined to return to the normal camera.

How to force first-person camera mode in a Decentraland area?▼

Use CameraModeArea on an entity with a Transform position and an area Vector3 defining the box size, setting mode to CameraType.CT_FIRST_PERSON. When the player leaves the area, the camera reverts to their preferred mode automatically.

Why does the third-person camera go through walls in Decentraland?▼

The camera passes through geometry when physics and pointer collision layers differ on a GltfContainer. Assign both ColliderLayer.CL_PHYSICS and ColliderLayer.CL_POINTER to the same visible or invisible meshes so the camera is blocked consistently.

Can I move the player camera directly in Decentraland SDK?▼

No, engine.CameraEntity is read-only and its Transform cannot be written. Instead, drive the Transform of an active VirtualCamera entity each frame while it is set as MainCamera.virtualCameraEntity, optionally pairing with InputModifier to disable avatar movement.

Why does my VirtualCamera stop working in Decentraland?▼

The engine disables VirtualCamera entities that move outside the scene's parcel bounds. Clamp the camera position to your parcel AABB every frame, and when deactivating, clear MainCamera.virtualCameraEntity before removing the camera entity to avoid the view falling to the player's feet.

Does mouselook camera control work on mobile in Decentraland?▼

No, the mouselook pattern relies on PrimaryPointerInfo.screenDelta, which always reports 0 on mobile devices. It is desktop-only, so you should design a touch-based fallback for mobile players.