mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-06-14 03:27:39 +00:00
do a basic scene and way too much organization and fail to implement panning
This commit is contained in:
parent
08069c9224
commit
6d269d0c14
6 changed files with 156 additions and 29 deletions
13
src/camera.rs
Normal file
13
src/camera.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
//! The general app camera module, not to be confused with the `game::camera`¹ module.
|
||||
//!
|
||||
//! 1: I can't link to out of scope private items, so you'll have to navigate there yourself.
|
||||
use bevy::prelude::*;
|
||||
|
||||
/// Sets up the camera for the entire app, with a starting position for the game. (TODO: probably change that)
|
||||
/// This camera is also used for menu rendering etc.
|
||||
pub fn setup(mut c: Commands) {
|
||||
c.spawn((
|
||||
Camera3d::default(),
|
||||
Transform::from_xyz(-20., 15., 0.).looking_at(Vec3::ZERO, Vec3::Y),
|
||||
));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue