update with proper scene setup
This commit is contained in:
parent
714be06192
commit
fda3502870
6 changed files with 111 additions and 88 deletions
|
@ -56,20 +56,21 @@ pub fn apply_viewer_to_projections(
|
|||
});
|
||||
}
|
||||
|
||||
pub fn simulate_viewer(mut query: Query<&mut Viewer>, time: Res<Time>) {
|
||||
pub fn simulate_viewer_with_circle(mut query: Query<&mut Viewer>, time: Res<Time>) {
|
||||
for mut v in query.iter_mut() {
|
||||
//v.position += Vec3::Y * 0.005;
|
||||
v.alpha += 1.5 * time.delta_seconds();
|
||||
|
||||
let radius = 1.0;
|
||||
let radius = 1.3;
|
||||
let offset = Vec3::new(0.0,0.0,8f32);
|
||||
let speed = 1.0f32;
|
||||
|
||||
v.alpha += speed * time.delta_seconds();
|
||||
|
||||
let z_distance = 3.0_f32;
|
||||
|
||||
v.position = Vec3::new(
|
||||
v.alpha.sin() * radius,
|
||||
v.alpha.cos() * radius,
|
||||
z_distance + v.alpha.sin(),
|
||||
);
|
||||
0.0,
|
||||
) + offset;
|
||||
|
||||
// info!("Viewer {:?}", v.position);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue