Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/utilyre/bevy_prank
Opinionated Unreal Engine inspired spectator camera for the Bevy game engine
https://github.com/utilyre/bevy_prank
bevy bevy-plugin camera game-development gamedev plugin
Last synced: about 2 months ago
JSON representation
Opinionated Unreal Engine inspired spectator camera for the Bevy game engine
- Host: GitHub
- URL: https://github.com/utilyre/bevy_prank
- Owner: utilyre
- License: apache-2.0
- Created: 2023-08-03T18:28:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-19T11:26:46.000Z (over 1 year ago)
- Last Synced: 2024-04-28T04:45:55.083Z (8 months ago)
- Topics: bevy, bevy-plugin, camera, game-development, gamedev, plugin
- Language: Rust
- Homepage: https://crates.io/crates/bevy_prank
- Size: 133 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## ✨ 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`
```bash
cargo add bevy_prank
```2. Add `PrankPlugin` to your app
```rust
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
```rust
use bevy::prelude::*;
use bevy_prank::prelude::*;fn setup(mut commands: Commands) {
commands.spawn((
Prank3d::default(),
Camera3dBundle::default(),
));
}
```For further information see [examples][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 |[examples]: https://github.com/utilyre/bevy_prank/tree/main/examples