#camera #bevy #bevy-plugin #unreal-engine #plugin #game-engine

bevy_prank

Opinionated Unreal Engine inspired spectator camera for the Bevy game engine

12 releases (7 breaking)

0.8.0 Aug 17, 2023
0.7.1 Aug 17, 2023
0.6.0 Aug 14, 2023
0.5.0 Aug 9, 2023
0.1.2 Aug 4, 2023

#2009 in Game dev

Download history 1/week @ 2024-03-10 76/week @ 2024-03-31

81 downloads per month

Custom license

33KB
558 lines

Bevy Prank

Opinionated Unreal Engine inspired spectator camera for the Bevy game engine.

demo.webm

✨ Features

  • Provides smooth interpolation for movement without sacrificing camera's translation.

  • Includes an optional HUD overlay to display important information like FOV and FPS.

  • Automatically grabs cursor when MMB/RMB is held.

  • Allows complete control over movement via LShift prefixed controls.

📦 Installation

  1. Install the crate using cargo

    cargo add bevy_prank
    
  2. Add PrankPlugin to your app

    use bevy::prelude::*;
    use bevy_prank::prelude::*;
    
    fn main() {
        App::new()
            // ...
            .add_plugins((DefaultPlugins, PrankPlugin::default()))
            // ...
            .run();
    }
    

🚀 Usage

Spawn a Camera3dBundle along with a Prank3d component

use bevy::prelude::*;
use bevy_prank::prelude::*;

fn setup(mut commands: Commands) {
    commands.spawn((
        Prank3d::default(),
        Camera3dBundle::default(),
    ));
}

For further information see examples.

🎮 Controls

Control Action
MMB + Drag Offsets the camera on its local x (left/right) and y (top/bottom) axes
RMB + Drag Rotates the camera
RMB + Scroll Adjusts movement speed
RMB + W A S D Moves the camera on its local x (left/right) and z (front/back) axes
RMB + E Q Moves the camera on the y (top/bottom) axis
RMB + LShift + W A S D E Q Moves the camera on the x (left/right), y (top/bottom) axes, and z (front/back) axes

Dependencies

~44–79MB
~1M SLoC