mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-07-04 11:07:40 +00:00
uh change idea
This commit is contained in:
parent
fc83ab8452
commit
684fdd5558
5 changed files with 70 additions and 3 deletions
|
@ -18,7 +18,24 @@ pub fn plugin(app: &mut App) {
|
|||
|
||||
/// Adds [ThirdPersonCamera] to our existing camera.
|
||||
pub fn setup_game_camera(mut c: Commands, cam: Single<Entity, With<Camera3d>>) {
|
||||
c.entity(*cam).insert(ThirdPersonCamera::default());
|
||||
c.entity(*cam).insert(ThirdPersonCamera {
|
||||
cursor_lock_key: KeyCode::Space,
|
||||
cursor_lock_toggle_enabled: true,
|
||||
gamepad_settings: CustomGamepadSettings::default(),
|
||||
cursor_lock_active: true,
|
||||
sensitivity: Vec2::new(1.0, 1.0),
|
||||
mouse_orbit_button_enabled: true,
|
||||
mouse_orbit_button: MouseButton::Middle,
|
||||
offset_enabled: false,
|
||||
offset: Offset::new(0.5, 0.4),
|
||||
offset_toggle_enabled: false,
|
||||
offset_toggle_speed: 5.0,
|
||||
offset_toggle_key: KeyCode::KeyE,
|
||||
zoom_enabled: true,
|
||||
zoom: Zoom::new(1.5, 30.0),
|
||||
zoom_sensitivity: 1.0,
|
||||
..Default::default()
|
||||
});
|
||||
info!("Third person camera set up!")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue