#bevy #camera #gamedev #zoom #3d #follow #topdown

bevy-topdown-camera

A simple 3d topdown camera for Bevy

1 unstable release

0.1.0 Oct 13, 2024

#1294 in Game dev

Download history 99/week @ 2024-10-07 68/week @ 2024-10-14

167 downloads per month

MIT/Apache

34KB
152 lines

bevy-topdown-camera

A simple 3d topdown camera plugin for the Bevy game engine.

Features

  • Smooth and fixed camera follow modes
  • Configurable zoom settings
  • Keyboard and mouse wheel zoom controls
  • Easy integration with Bevy projects

Quick Start

  1. Add plugin to your app
  2. Add the component to an orthographic camera:
commands
    .spawn(Camera3dBundle::default())
    .insert(PanCam::default());
  1. Add TopdownFollowTarget component to player entity (entity you want the camera to follow)
commands
    .spawn(PbrBundle {
        mesh: meshes.add(Capsule3d::new(0.3, 1.0).mesh()),
        material: materials.add(Color::srgb(0.8, 0.7, 0.6)),
        transform: Transform::from_xyz(0.0, 0.75, 0.0),
        ..default()
    }).insert(TopdownFollowTarget);

See the basic example.

License

Licensed under either of

at your option.

Dependencies

~35–73MB
~1.5M SLoC