Giter Club home page Giter Club logo

bevy_dolly_cameras's Introduction

bevy_dolly

Static Pinned
bevy dolly static bevy dolly pinned
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

bevy_dolly_camera is a prototype plugin using h3r2tic's powerful crate: dolly, implemented for bevy.

โš  Feedback - Bevy_dolly's API is still being revised, so feedback on ergonomics and DX is highly appreciated โš 

It is important to note that dolly is a way to control the movement of the camera and thus, not the camera component itself.

Dolly requires two steps to function:

  1. Creating a Rig we are able to define drivers on which the dolly can enact, these drivers can both be constraints and functionality.
  2. A marker component that is registered on both the Camera and the Rig.

What are drivers?

Explain what drivers are

To read more about the different drivers.

#[derive(Component)]
struct MainCamera;

fn main() {
  App::new()
    .add_plugins(DefaultPlugins)
    .add_startup_system(setup)
    //..
    .add_system(Dolly::<MainCamera>::update_active)
    //..
    .run();
}
// In your setup system
fn setup(
  mut commands: Commands,
) {
  commands.spawn((
    MainCamera, // The rig tag
    Rig::builder()
      .with(Position::new(Vec3::ZERO))
      .with(YawPitch::new().yaw_degrees(45.0).pitch_degrees(-30.0))
      .with(Smooth::new_position(0.3))
      .with(Smooth::new_rotation(0.3))
      .with(Arm::new(Vec3::Z * 4.0))
      .build(),
    Camera3dBundle::default(),
  ));
}

Link to examples readme

Helpers

This plugin currently also provides some helper plugins, which. They are enabled by default but are not needed and can be removed when setting up bevy_dolly's dependency:

[dependencies]
bevy_dolly = { version = "0.0.1", default-features = false }

Note this will also remove the bevy_dolly's extended drivers and add features = ["drivers"], to include the drivers back.

Examples

To see how works in Bevy in practice, please look at this repository's examples.

How to run

cargo run --release --example orbit

Support

Bevy tracking

bevy bevy_dolly
0.12
0.11

Alternatives

There is a bunch of other bevy camera controllers that are worth checking out, especially if you are just starting out learning bevy:

Licensing

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

Contributing

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

bevy_dolly_cameras's People

Contributors

actuallyhappening avatar blackphlox avatar janhohenheim avatar nvdaz avatar slyedoc avatar superdump avatar

Forkers

jasonpanosso

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.