orbit works

This commit is contained in:
Brooks Palin
2024-02-29 22:14:25 -07:00
parent 48635f0f63
commit 521bdde43a
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -95,9 +95,9 @@ fn main() {
frames,
output_res,
);
if orbit {
app.insert_resource(OrbitSettings { radius: 10.0 })
app.insert_resource(OrbitSettings { radius: 5.0 })
.add_systems(Update, orbit_scene);
}
@@ -164,7 +164,7 @@ struct OrbitSettings {
}
fn orbit_scene(
mut camera: Query<&mut Transform, With<PrimaryWindow>>,
mut camera: Query<&mut Transform, With<Camera>>,
orbit_settings: Res<OrbitSettings>,
time: Res<Time>,
) {
@@ -173,9 +173,9 @@ fn orbit_scene(
};
main_cam_transform.translation = Vec3::new(
orbit_settings.radius * time.elapsed_seconds().cos() * 10.0,
orbit_settings.radius * time.elapsed_seconds().sin(),
orbit_settings.radius * time.elapsed_seconds().cos(),
6.0,
orbit_settings.radius * time.elapsed_seconds().sin(),
);
main_cam_transform.look_at(Vec3::ZERO, Vec3::Y);
}
+1 -1
View File
@@ -147,7 +147,7 @@ fn extract_screen_capture_components(
) {
for (entity, screen_capture) in screen_capure_comps.iter() {
if screen_capture.should_capture() {
println!(
info!(
"Capturing Frame: {} / {}",
screen_capture.frames, screen_capture.max_frames
);