| Crates.io | bevy_top_down_camera |
| lib.rs | bevy_top_down_camera |
| version | 0.3.0 |
| created_at | 2025-07-25 18:49:15.89276+00 |
| updated_at | 2026-01-21 14:19:50.262984+00 |
| description | A top down camera written for Bevy |
| homepage | https://github.com/olekspickle/bevy_top_down_camera |
| repository | https://github.com/olekspickle/bevy_top_down_camera |
| max_upload_size | |
| id | 1767911 |
| size | 164,108 |

Add the bevy_top_down_camera crate:
cargo add bevy_third_person_camera
Import the bevy_top_down_camera crate:
use bevy_top_down_camera::*;
Add the TopDownCameraPlugin:
.add_plugins(TopDownCameraPlugin)
Add the TopDownCamera component to the camera entity:
commands.spawn((
Camera3d::default(),
TopDownCamera::default(),
));
If you want camera to follow the player, add the TopDownCameraTarget component to your player:
// Player
commands.spawn((
MeshMaterial3d(materials.add(Color::WHITE)),
Mesh3d(meshes.add(Mesh::from(Cuboid::new(1.0, 1.0, 1.0)))),
Transform::from_translation(Vec3::new(0.0, 0.5, 0.0)),
TopDownCameraTarget,
Player,
));
Most settings can be overridden:
commands.spawn((
// These are the default settings
TopDownCamera {
motion: Motion {
follow: true,
move_speed: 0.05,
max_speed: 200.0,
rotate_speed: 0.01,
edge_margin: Vec2::splat(30.0),
..default()
},
zoom: Some((5.0, 50.0).into()),
height: Some((5.0, 50.0).into()),
height_rise_key: KeyCode::KeyX.into(),
height_lower_key: KeyCode::KeyZ.into(),
rotate_key: MouseButton::Right.into(),
..default()
},
Camera3d::default(),
));
When using third party physics engines such as bevy rapier 3d or avian 3d, you should force the 'sync_player_camera' system to run after the physics systems. Failing to do this will cause a jittering effect to occur when applying forces/impulses to an object that has a camera entity attached. Simply add the following to your App::new() method (also see examples/physics.rs for complete example):
.configure_sets(PostUpdate, CameraSyncSet.after(PhysicsSet::StepSimulation)) // Bevy Rapier 3d
.configure_sets(PostUpdate, CameraSyncSet.after(PhysicsSet::Sync)) // Avian 3d
| Action | Mouse/Keyboard | Enabled by Default |
|---|---|---|
| Zoom In | Scroll Up | Yes |
| Zoom Out | Scroll Down | Yes |
| Rotate | Right Mouse Button | Yes |
| Move around | Hover to screen edges | Yes |
| Follow | - | No |
| bevy | bevy_top_down_camera |
|---|---|
| 0.18 | 0.18.0 |
| 0.17 | 0.2.0 |
| 0.16 | 0.1.0 - 0.1.5 |