/bevy-skills:bevy-camerasfrom bevy-skills
Guides Bevy 0.20 camera setup: Camera3d/Camera2d, projections, RenderTarget textures, HDR/tonemapping, and built-in camera controllers.
Ships in bevy-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
order for overlays.ScreenSpaceTransmission opt-in).Tonemapping::None suddenly looks different (0.20 made it a pure passthrough).Controllers are feature-gated. In Cargo.toml:
bevy = { version = "0.20", features = ["free_camera", "pan_camera", "pan_orbit_camera"] }
use bevy::asset::RenderAssetUsages;
use bevy::camera::{Hdr, RenderTarget};
use bevy::camera_controller::free_camera::{FreeCamera, FreeCameraPlugin};
use bevy::core_pipeline::tonemapping::Tonemapping;
use bevy::prelude::*;
use bevy::render::render_resource::{Extent3d, TextureDimension, TextureFormat, TextureUsages};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(FreeCameraPlugin) // adds the input wiring
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>>) {
// 1. Main camera with the built-in free-look controller.
commands.spawn((
Camera3d::default(),
Hdr, // `bevy::camera::Hdr` since 0.19
Tonemapping::default(), // TonyMcMapface; `Linear` = no curve, keep grading
FreeCamera::default(),
Transform::from_xyz(0.0, 4.0, 8.0).looking_at(Vec3::ZERO, Vec3::Y),
));
// 2. A texture target for an off-screen render pass (mini-map, portal).
let size = Extent3d { width: 512, height: 512, depth_or_array_layers: 1 };
let mut image = Image::new_fill(
size,
TextureDimension::D2,
&[0; 4],
TextureFormat::Bgra8UnormSrgb,
RenderAssetUsages::default(),
);
image.texture_descriptor.usage = TextureUsages::TEXTURE_BINDING
| TextureUsages::COPY_DST
| TextureUsages::RENDER_ATTACHMENT;
let image_handle = images.add(image);
// 3. A second camera that draws into the texture.
// `RenderTarget` is a separate component, not a `Camera` field.
commands.spawn((
Camera3d::default(),
Camera { order: -1, ..default() }, // lower order renders first
RenderTarget::Image(image_handle.into()),
Transform::from_xyz(10.0, 5.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y),
));
}
use bevy::prelude::*;
fn _proj(mut commands: Commands) {
// Default perspective.
commands.spawn((Camera3d::default(), Projection::default()));
// Orthographic for top-down or strategy views.
commands.spawn((
Camera3d::default(),
Projection::Orthographic(OrthographicProjection {
scale: 10.0,
..OrthographicProjection::default_3d()
}),
));
}
bevy_editor_cam was upstreamed as PanOrbitCamera. It needs picking for depth-aware
zoom, so add MeshPickingPlugin too.
use bevy::camera_controller::pan_orbit_camera::{DefaultPanOrbitCameraPlugins, PanOrbitCamera};
use bevy::prelude::*;
fn _orbit(app: &mut App, mut commands: Commands) {
app.add_plugins((MeshPickingPlugin, DefaultPanOrbitCameraPlugins));
commands.spawn((Camera3d::default(), PanOrbitCamera::default()));
}
use bevy::light::GlobalAmbientLight;
use bevy::prelude::*;
fn _amb(app: &mut App, mut commands: Commands) {
// World default — applies everywhere unless a camera overrides.
app.insert_resource(GlobalAmbientLight { brightness: 200.0, ..default() });
// Per-camera override — `AmbientLight` is a Component.
commands.spawn((Camera3d::default(), AmbientLight { brightness: 1000.0, ..default() }));
}
ScreenSpaceTransmission is opt-in. Camera3d no longer requires it. Add bevy::pbr::ScreenSpaceTransmission::default() to get refraction through transmissive StandardMaterials.Tonemapping::None is a full passthrough. No ColorGrading, no DebandDither, no clamp. Use the new Tonemapping::Linear for "no tone curve but keep the rest". Camera2d now defaults to Tonemapping::Linear.Tonemapping / DebandDither moved to bevy_render::view. The bevy::core_pipeline::tonemapping::Tonemapping import still works via re-export; reflected type paths in scene files changed.Hdr camera stacks composite instead of overwrite. Set blend_state in CameraOutputMode::Write for the old replace behaviour. SortedCamera::hdr is gone.RenderDebugOverlay keybindings. RenderDebugOverlayPlugin joins DefaultPlugins (disabled by default) only with the bevy_dev_tools + render_dev_tools features.Hdr moved to bevy::camera::Hdr and is not extracted to the render world; read ExtractedCamera::hdr there.Camera3d::screen_space_specular_transmission_* fields are gone. They became ScreenSpaceTransmission { steps, quality } in bevy_pbr.Skybox moved to bevy::light and image is Option<Handle<Image>>.Atmosphere is an entity, not a camera component. The camera keeps AtmosphereSettings.PanCamera pans with the mouse by default. Set mouse_pan_settings.enabled = false for keyboard-only.ExtractedView::hdr moved to ExtractedCamera::hdr; TextureFormat::bevy_default() is deprecated — read ExtractedView::target_format.ViewTarget::out_texture() returns Option (None when the surface is occluded or CameraOutputMode::Skip).Core3d / Core2d schedules; RenderSystems::ManageViews split into CreateViews, Specialize, PrepareViews.RenderTarget is its own component; Camera { target: ... } does not exist. RenderTarget::None renders prepasses only.AmbientLight is a component; the resource is GlobalAmbientLight.Camera::order is signed. Lower renders first.free_camera + FreeCameraPlugin, pan_camera + PanCameraPlugin, pan_orbit_camera + DefaultPanOrbitCameraPlugins.bevy::camera::{RenderTarget, Hdr}, bevy::camera_controller::{free_camera, pan_camera, pan_orbit_camera}, bevy::light::GlobalAmbientLight. None are in the prelude.bevy-pbr-materials — materials, lights, ContactShadows, atmosphere.bevy-capture — recording a camera's RenderTarget::Image to video.bevy-migration-0-19-to-0-20 — Tonemapping::Linear, opt-in transmission.bevy-migration-0-18-to-0-19 — Hdr/Skybox/Atmosphere moves.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub chrisgliddon/bevy-skills --plugin bevy-skills32 skills in this plugin
/bevyUse when starting any Bevy task, choosing between Update and FixedUpdate, picking Cargo feature flags, or recalling which sibling skill covers ECS, assets, rendering, UI, or migration. Routes to the right Bevy 0.20 skill and pins the engine version for downstream snippets./bevy-a11yUse when designing or auditing high-standard video-game accessibility in Bevy 0.20, integrating screen readers and focus navigation, supporting adaptive controllers and complete remapping, implementing captions or audio description, checking contrast and motion safety, or building disabled-player test evidence./bevy-animationUse when wiring `AnimationPlayer` + `AnimationGraphHandle`, building an `AnimationGraph` from glTF clips, blending state-driven animations with `AnimationTransitions::play`, isolating body parts with `AnimationMask`, firing gameplay sync via `#[derive(AnimationEvent)]` + `On<E>` observers, tweening with `AnimatableCurve` / `EaseFunction` / `CubicSegment::new_bezier_easing` from `bevy::curve`, or applying the 12 Basic Principles of Animation to 3D characters in Bevy 0.20./bevy-assetsUse when loading with `AssetServer::load` or `AssetServer::load_builder().with_settings(..)`, holding a `Handle<T>`, spawning a glTF scene with `WorldAssetRoot` (`Handle<WorldAsset>`), mutating through `Assets::get_mut` / `AssetMut`, polling `LoadState::is_loaded`, resolving an `AssetPath`, or replacing `AssetId::invalid()` with `Option<AssetId<T>>` in Bevy 0.20./bevy-audioUse when implementing audio in Bevy 0.20 with `AudioPlayer`, `PlaybackSettings`, `AudioSink` or `SpatialAudioSink`, spatial listeners, application mix groups, ambience/music transitions, asset lifetime, browser gesture restrictions, or choosing built-in audio versus `bevy_seedling 0.8`./bevy-captureUse when adding `CapturePlugin` to record a `Camera3d` or `Camera2d` to video, spawning `CaptureBundle` with `RenderTarget::target_headless`, calling `Capture::start` with `Mp4Openh264Encoder`, `Mp4FfmpegCliEncoder`, `Mp4FfmpegCliPipeEncoder`, `GifEncoder` or `FramesEncoder`, pausing with `Capture::pause`, or hitting "failed to select a version for bevy_capture" because the crate still pins Bevy 0.19 while your app is on Bevy 0.20.Other plugins' skills for the same job