Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with main, updating readme #45

Merged
merged 6 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/target

# These are backup files generated by rustfmt
**/*.rs.bk
**/*.rs.bk
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ struct MainCamera;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_startup_system(setup)
//..
.add_system(Dolly::<MainCamera>::update_active)
.add_system(Startup, setup)
.add_system(Update, Dolly::<MainCamera>::update_active)
.add_system(Update, update_input)
//..
.run();
}
Expand All @@ -81,7 +82,7 @@ fn setup(
MainCamera, // The rig component tag
Rig::builder() // The rig itself
.with(Position::new(Vec3::ZERO)) // Start position
// Adds a driver with method rotate_yaw_pitch
// Adds a driver with the method rotate_yaw_pitch
.with(YawPitch::new().yaw_degrees(45.0).pitch_degrees(-30.0))
// Interpolation when the translation is updated, also known as smoothing
.with(Smooth::new_position(0.3))
Expand Down
2 changes: 2 additions & 0 deletions src/dolly_type.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use bevy::prelude::{Component, Deref, DerefMut};
use dolly::{driver::RigDriverTraits, prelude::CameraRig, rig::CameraRigBuilder};

use crate::dolly;

#[derive(Component, Deref, DerefMut)]
pub struct Rig(CameraRig);

Expand Down
5 changes: 4 additions & 1 deletion src/drivers/follow.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use crate::{
dolly::{self, prelude::*},
prelude::RigDriver,
};
use bevy::prelude::*;
use dolly::{driver::RigDriver, prelude::*};

impl MovableLookAt {
pub fn from_position_target(target_position: Vec3) -> Self {
Expand Down
4 changes: 4 additions & 0 deletions src/drivers/fpv.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
use crate::{
dolly,
prelude::{Position, Rotation, YawPitch},
};
use bevy::prelude::*;
use dolly::{driver::RigDriver, prelude::*};

Expand Down
Loading