Skip to content

Commit

Permalink
fix camera scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukinoko-kun committed Jul 2, 2024
1 parent b80dac7 commit 3286af8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@
*/

use bevy::prelude::*;
use bevy::render::camera::ScalingMode;

fn add_camera(mut commands: Commands) {
commands.spawn(Camera2dBundle::default());
let mut my_2d_camera_bundle = Camera2dBundle::default();
my_2d_camera_bundle.projection.scaling_mode = ScalingMode::FixedVertical(1600.0);
my_2d_camera_bundle.transform = Transform::from_xyz(0.0, 0.0, 0.0);

commands.spawn(my_2d_camera_bundle);
}

pub struct CamPlugin;
Expand Down

0 comments on commit 3286af8

Please sign in to comment.