camera-control

Control camera modes, virtual cameras, and camera areas in Decentraland SDK7 scenes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Decentraland scenes often need scripted camera behavior — forced first-person zones, cinematic cutscenes, mouselook aiming, or spectate modes — but the engine does not let you move the player's real camera directly. This Skill documents the correct SDK7 APIs and verified patterns to implement all of these without common pitfalls like dead-entity camera bindings or out-of-bounds VirtualCameras. ## Core Features & Use Cases - Camera State Reading: Poll camera position/rotation via engine.CameraEntity and detect first/third-person mode with CameraMode and CameraMode.onChange. - Forced Camera Regions: Use CameraModeArea to force first-person or third-person view inside a defined volume, with Creator Hub inspector support. - Cinematic Virtual Cameras: Create VirtualCamera entities with speed/time transitions, lookAtEntity tracking, custom FOV, and safe activation/teardown via MainCamera. - Worked Patterns: Full implementations for camera zone triggers, NPC-follow cameras, FPS-style mouselook (via PrimaryPointerInfo.screenDelta), and a complete spectate/observer mode with a two-entity yaw/pitch rig. - Use Case: Build a spectator mode for a multiplayer scene where an observer toggles into a free-roaming camera, cycles through players to follow, and stays clamped inside parcel bounds. ## Quick Start Ask the assistant to add a VirtualCamera cutscene or a spectate mode to your Decentraland SDK7 scene using the camera-control patterns.

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 SDK7 scene?

Create an entity with a Transform and VirtualCamera component, then activate it by setting MainCamera.createOrReplace(engine.CameraEntity, { virtualCameraEntity: yourEntity }). You can configure Speed or Time transitions, an optional fov in degrees, and lookAtEntity to track a target.

How do I force first-person camera in a specific area?

Use CameraModeArea on an entity with an area size and mode set to CameraType.CT_FIRST_PERSON. When the player enters the volume the camera switches, and it reverts to their preferred mode when they leave.

Can I move the player's camera directly in Decentraland?

No, engine.CameraEntity is read-only. To control the view, drive the Transform of an active VirtualCamera entity each frame while it is set as MainCamera.virtualCameraEntity, typically paired with InputModifier to disable avatar movement.

Why does my camera view drop to the player's feet after removing a VirtualCamera?

This happens when you delete the VirtualCamera entity before clearing MainCamera.virtualCameraEntity, leaving the engine bound to a dead entity. Clear the binding first, keep the entity alive about one second, then remove it.

Does mouselook camera control work on mobile in Decentraland?

No, PrimaryPointerInfo.screenDelta always reports 0 on mobile, so the mouselook pattern is desktop-only. Design a touch fallback for mobile players, as done in the spectate mode reference scene.

Why does my VirtualCamera stop working when it moves far away?

The engine disables VirtualCamera entities that move outside parcel bounds. Clamp the camera position to your scene's parcel AABB every frame, matching BOUNDS_MIN and BOUNDS_MAX to your scene.json parcels.