All Projects → BlackPhlox → bevy_config_cam

BlackPhlox / bevy_config_cam

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE-APACHE MIT LICENSE-MIT
A Swiss Army knife of a camera plugin that allows for easy setup and configuration of a wide variety of types of moveable cameras and player cameras for a scene.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to bevy config cam

bevy mod bounding
Unofficial plugin for generating bounding boxes in Bevy
Stars: ✭ 21 (-86.45%)
Mutual labels:  bevy
libracity
LibraCity - City planning on a needle! LibraCity is a puzzle game where you build a city at equilibrium on a needle. To succeed, take advantage of the various weights of the buildings, and place them all while ensuring the city remains stable.
Stars: ✭ 22 (-85.81%)
Mutual labels:  bevy
bevy chess
Chess demo in Bevy
Stars: ✭ 59 (-61.94%)
Mutual labels:  bevy
dango-tribute
👀
Stars: ✭ 20 (-87.1%)
Mutual labels:  bevy
bevy tilemap
Tilemap with chunks for the Bevy game engine.
Stars: ✭ 169 (+9.03%)
Mutual labels:  bevy
kurinji
Kurinji Input Map aims to decouple game play code from device specific input api. This is achieved by providing apis that allows you to map game actions to device input events instead of directly handling device inputs.
Stars: ✭ 47 (-69.68%)
Mutual labels:  bevy
bevy transform gizmo
A 3d gizmo for transforming entities in Bevy.
Stars: ✭ 41 (-73.55%)
Mutual labels:  bevy
taileater
A puzzle game where you eat your own tail to win!
Stars: ✭ 19 (-87.74%)
Mutual labels:  bevy
bevy kira audio
A Bevy plugin to use Kira for game audio
Stars: ✭ 99 (-36.13%)
Mutual labels:  bevy
space
A SCI-FI community game server simulating space(ships). Built from the ground up to support moddable online action multiplayer and roleplay!
Stars: ✭ 25 (-83.87%)
Mutual labels:  bevy
bevy lint
A Linter for bevy code
Stars: ✭ 21 (-86.45%)
Mutual labels:  bevy
bevy easings
Helpers and Plugins for Bevy
Stars: ✭ 83 (-46.45%)
Mutual labels:  bevy
bevy
A refreshingly simple data-driven game engine built in Rust
Stars: ✭ 15,920 (+10170.97%)
Mutual labels:  bevy
bevy 4x camera
A 4X style camera for bevy.
Stars: ✭ 26 (-83.23%)
Mutual labels:  bevy
bevy-robbo
Port of mrk-its/rust-robbo to bevy
Stars: ✭ 33 (-78.71%)
Mutual labels:  bevy
bevy retrograde
Plugin pack for making 2D games with Bevy
Stars: ✭ 212 (+36.77%)
Mutual labels:  bevy
rgis
Performant, cross-platform (web, desktop) GIS app written in Rust
Stars: ✭ 79 (-49.03%)
Mutual labels:  bevy
bevy template
Compile-time optimized Bevy project template
Stars: ✭ 27 (-82.58%)
Mutual labels:  bevy
not snake game
A snake-inspired game made in Rust using the Bevy game engine.
Stars: ✭ 65 (-58.06%)
Mutual labels:  bevy
bevy prototype networking laminar
This is a prototype of a networking crate for bevy. This create provides a low-level networking plugin built on top of laminar
Stars: ✭ 30 (-80.65%)
Mutual labels:  bevy
bevy config cam

link to crates.io link to docs.rs link to license downloads/link to crates.io stars/github repo github actions tracking bevy release branch

An easy plug-n-play multifunctional camera controller that allows for easy setup of a camera and player for a scene.

Add a few lines of code to your existing project allows you to test a wide variety of cameras by attaching it to your player asset or the default red player entity.

Inspired and extended on bevy_flycam, this plugin is fairly simple but should be a neat help for developers looking for a camera implementation without going the hassle of reinventing the wheel.

Future Plans

The main goal of this plugin is to first and foremost provide the user with a configurable, extendable and easy-to-use API. dolly by @h3r2tic is a crate that provides an framework for which to create, combine and modify camera positioning, exactly what bevy_config_cam is looking for. So a migration to dolly is in the works in order to improve this plugin main goal.

Showcase

Camera Modes

LookAt FollowStatic
LookAt FollowStatic
TopDown TopDownDirection
TopDown TopDownDirection
FollowBehind Fps
FollowBehind Fps
Free ?
Free Any suggestions on other camera modes you want? Let me know by creating an issue :)

Settings

Camera Mode Disc. Demo
MovementSpeed (Camera) Change the speed of there cameras movement
Sensitivity Change the sensitivity of the cameras mouse movement
Lerp Change the linear interpolation between the target and the player (LookAt camera-mode only)
Zoom/FOV Change the FOV of the camera LowFOV
CamFwd (Unused) Toggle between xyz movement relative to world coords or camera local coords and rotation (Free camera-mode only)

Getting started

Test the project

Before I start using a plugin, I all ways like to run the examples prior to setting it up for my own project. Just to see if the plugin satisfy my needs. If you're like me then this is for you.

  1. Clone this repo to your local machine
  2. Go into the project folder (cd bevy_config_cam)
  3. And run the cargo command (cargo run --release --example simple)
  4. Test functionality
    Player : for movement, RShift & - for going up and down.
    Camera : WASD for movement, Space & LShift for going up and down.
    Switch Camera: C (Look in console for which camera type you are on)
    Settings: E and use the mouse-scroll to change the selected settings value.

Add to your own project

Adding this plugin to your project is very simple, it only requires you to write 2 lines of code.

Step 1. - Setup

Add the correct version to your Cargo.toml, you can find the version you are looking for under the support section. The thing you should be adding should look like this (only add the line marked by # <--):

[dependencies]
bevy = { version = "0.7"}
# ...
bevy_config_cam = { version = "0.3.0"} # <-- 

Step 2. - Add to project

fn main() {
    App::new()
        .insert_resource(Msaa { samples: 4 })
        .add_plugins(DefaultPlugins)
        .add_plugin(ConfigCam) // <--
        // ... 
        // Your other plugins and game code here
        // ...
        .run();
}

Step 3. - Config (Optional)

Now, there is a reason for the name bevy_config_cam. It is most likely that you want something more than just the default behavior. You might want to toggle between 2 types of cameras or allow the user to change the fov using a slider. Currently I haven't gotten far with creating a user-friendly api you can access but is something I will look into. For now you can insert two resources to override the default behavior of the plugin, as seen in the example:

    .insert_resource(MovementSettings {
        sensitivity: 0.00015, // default: 0.00012
        speed: 15.0,          // default: 12.0
        dist: 5.0,            // Camera distance from the player in topdown view
        ..Default::default()
    })
    .insert_resource(PlayerSettings {
        pos: Vec3::new(2., 0., 0.),//Initial position of the player
        player_asset: "models/craft_speederA.glb#Scene0", //Model of the player, default is a red cube
        ..Default::default()
    })

Note: That some of them are overwritten by accessing the settings or the changing the camera type. Feedback on this is high appreciated, just create a new issue and I'll look into it when I have the time.

Support

Bevy tracking

bevy bevy_config_cam
0.5 0.1.X
0.6 0.2.X
0.7 0.3.X

Licensing

The project is under dual license MIT and Apache-2.0, so yoink to your hearts content, just remember the license agreements.

Contributing

Yes this project is still very much WIP, so PRs are very welcome

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].