bevy-cameras

Document Bevy camera setup for 2D and 3D contexts.

125|10|Updated Nov 22, 2022
One-click install
npx skills add https://github.com/nolantait/bevy-starter --skill bevy-cameras
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bevy-cameras
Source: https://github.com/nolantait/bevy-starter/tree/main/.agents/skills/bevy-cameras
Command: npx skills add https://github.com/nolantait/bevy-starter --skill bevy-cameras

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bevy projects often require a clear, reusable reference for configuring and using cameras across 2D and 3D contexts. This Skill provides a structured guide for Camera2d, Camera3d, viewports, projection types, render layers, and common camera interactions like mouse-to-world and free camera control.

Core Features & Use Cases

  • Camera2d and Camera3d initialization and usage
  • Viewport configuration, render layers, and orthographic/perspective projections
  • Mouse-to-world coordinate mapping and a basic free-camera controller example
  • Practical scenarios: debugging scenes, multi-camera setups, split-screen, and debugging overlays

Quick Start

Spawn a Camera2d or Camera3d and experiment with a free-camera controller to explore movement and projections.

Frequently Asked Questions about bevy-cameras

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

FAQPage Schema
How do I set up a camera in Bevy for 2D and 3D applications?

Bevy camera setup involves spawning a Camera2d or Camera3d component to render your scene. This Skill provides references for initializing cameras, configuring orthographic and perspective projections, and managing viewports.

How do I map mouse coordinates to world coordinates in Bevy?

Mouse-to-world mapping in Bevy translates screen cursor positions into global 3D or 2D scene coordinates. This Skill provides reference examples for calculating these mappings to enable object picking and scene interaction.

Can I configure viewports and render layers for a multi-camera setup in Bevy?

Bevy supports configuring viewports and render layers to manage multi-camera setups. This Skill covers isolating rendered objects using layers and defining screen regions with viewports for split-screen or debugging overlays.

What is the best way to implement a free-camera controller in Bevy?

Implementing a Bevy free-camera controller involves updating camera transform and projection components based on user input. This Skill includes an example free-camera controller to explore movement and scene navigation.

Does this Bevy camera reference cover both orthographic and perspective projections?

This Bevy camera reference covers both orthographic and perspective projection types. It explains configuring these projection modes for Camera2d and Camera3d to suit your specific 2D and 3D rendering requirements.