
Bevy Adapt 2d To 3d
Rewrite Bevy 2D actors and cameras into 3D meshes and Camera3d while keeping gameplay...
Install
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-adapt-2d-to-3d -g -a claude-code -y- Repository
- thedivergentai/Game-Dev-Agentic-Skills917
- Category
- Media
- Updated
- 19d ago
- License
- LGPL-3.0
- Context cost
- Mediumabout 1,928 tokens
- Runs scripts
- No, instructions only
What it does
Rewrite Bevy 2D actors and cameras into 3D meshes and Camera3d while keeping gameplay components. Use when a Bevy 2D game should gain a perspective camera, mesh draw, and a planar velocity lifted onto XZ. Keywords: Camera2d, Camera3d, Sprite, Mesh3d, StandardMaterial, WishVelocity.
Bevy adapt 2D to 3D
When to use
Load this when a 2D design should gain a 3D camera and meshes. Keep gameplay components. Swap the camera and the drawable.
ECS shape
- Cameras:
Camera2dandCamera3dare already documented on bevy-camera-systems. An entity should not keep both as if they were one camera mode unless that skill says so. - Draw:
Spriteis 2D. Meshes andStandardMaterialare 3D (bevy-3d-materials). - Features: the crate page separates
2dand3dprofiles. Enabling 3D does not delete 2D types. - Motion: bevy-character-movement stays the locomotion skill. A 3D velocity is still your component until a solver exists.
What changes
| Keep | Replace |
|---|---|
| Gameplay components on the actor | Sprite with Mesh3d and MeshMaterial3d |
| The camera entity | Camera2d with Camera3d and a perspective Projection |
| Planar motion as data | Vec2 velocity with a Vec3 wish on XZ |
There is no conversion helper. A startup system rewrites the entities you already spawned. Physics solvers stay on the physics skills.
[dependencies]
bevy = "0.20"
use bevy::mesh::Meshable;
#[derive(Component)]
struct Actor;
#[derive(Component)]
struct PlanarVelocity(Vec2);
#[derive(Component)]
struct WishVelocity(Vec3);


