# Bevy Adapt 3d To 2d

Bevy ECS skill for moving a Bevy game from 3D to 2D.

- Repository: https://github.com/thedivergentai/Game-Dev-Agentic-Skills (917 stars)
- Category: Media
- License: LGPL-3.0
- Last updated: 2026-10-16
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-adapt-3d-to-2d -g -a claude-code -y`
Codex: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-adapt-3d-to-2d -g -a codex -y`
Cursor: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-adapt-3d-to-2d -g -a cursor -y`
Gemini CLI: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-adapt-3d-to-2d -g -a gemini-cli -y`

## Description

Bevy ECS skill for moving a Bevy game from 3D to 2D. Keywords: Bevy, 3D, 2D, adapt, sprite, camera.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Bevy adapt 3D to 2D

## When to use

Load this when a 3D design should render as sprites or billboards. Gameplay components stay. Render components change.

## ECS shape

- **Draw:** replace mesh and PBR material entities' render parts with `Sprite` where a billboard is enough.
- **Camera:** use `Camera2d` from bevy-camera-systems.
- **Lights:** 3D light entities are not required for an unlit sprite. Do not leave clustered-light assumptions in gameplay code.

## What stays and what changes

| Piece | Bevy idiom |
| --- | --- |
| Gameplay on the actor | Keep the same components. Swap render components for `Sprite`. |
| View | `Camera2d`. |
| Draw order | A `DrawOrder` component you store, then write into `Transform`. |

## Examples

```toml
[dependencies]
bevy = "0.20"
```

Gameplay components stay on the entity. The 3D render components come off, and a `Sprite` goes on. `Camera2d` is the view.

```rust
#[derive(Component)]
struct Actor;

#[derive(Component)]
struct DrawOrder(f32);

fn spawn_flat_view(mut commands: Commands) {
    commands.spawn(Camera2d);
}

fn present_as_sprites(
    mut commands: Commands,
    asset_server: Res<AssetServer>,
    actors: Query<(Entity, &DrawOrder), With<Actor>>,
) {
    let image = asset_server.load("actors/hero.png");
    for (entity, order) in &actors {
        commands
            .entity(entity)
            .remove::<Mesh3d>()
            .remove::<MeshMaterial3d<StandardMaterial>>()
            .insert((
                Sprite {
                    image: image.clone(),
                    custom_size: Some(Vec2::new(64.0, 64.0)),
                    ..default()
                },
                Transform::from_xyz(0.0, order.0, 0.0),
            ));
    }
}
```

A new actor can spawn already flat. The same `Actor` component is what gameplay systems query.

```rust
#[derive(Component)]
struct Actor;

The rest: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/HEAD/skills/bevy-adapt-3d-to-2d/SKILL.md
