Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panning breaks when a customly sized app window is used #73

Open
InnocentusLime opened this issue Apr 16, 2023 · 0 comments
Open

Panning breaks when a customly sized app window is used #73

InnocentusLime opened this issue Apr 16, 2023 · 0 comments

Comments

@InnocentusLime
Copy link

System configuration

OS: Windows 11
Bevy: 0.10.1 (from crates.io)

Display resolution: 1920 x 1080
rustc --version: rustc 1.68.2 (9eb3afe9e 2023-03-27)
rustup default: stable-x86_64-pc-windows-msvc

bevy startup output:

2023-04-16T13:03:12.341333Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon (TM) Graphics", vendor: 4098, device: 5607, device_type: IntegratedGpu, driver: "AMD proprietary driver", driver_info: "21.40.52", backend: Vulkan }
2023-04-16T13:03:13.221788Z  INFO bevy_editor_pls_default_windows::cameras: Spawning editor cameras
2023-04-16T13:03:13.827399Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Pro", kernel: "22621", cpu: "AMD Ryzen 7 5825U with Radeon Graphics", core_count: "8", memory: "14.8 GiB" }

What versions the problem happens on

This problem happens with bevy_editor_pls 0.4 and the latest version on the main branch on github (when I fetched it the latest commit was f202123)

The issue

When I create an App with a window that has a custom size (different from the one provided in the default() of Window), the panning controls in the editor become completely unresponsive, leaving only the scrolling enabled.

Code to reproduce the issue

use bevy::{prelude::*, window::WindowResolution};
use bevy_editor_pls::EditorPlugin;

fn startup(
    asset_server: Res<AssetServer>,
    mut commands: Commands,
) {
    // Spawned for demonstration purposes, so the starting window isn't black
    commands.spawn(Camera2dBundle::default());
    // Spawned for demonstration purposes to provide visual reference
    commands.spawn(SpriteBundle {
        texture: asset_server.load("bevy.png"),
        ..default()
    });
}

fn game_window() -> Window {
    Window {
        resolution: WindowResolution::new(
            1150.0,
            600.0,
        ),
        ..Default::default()
    }
}

fn main() {
    App::new()
        .add_plugins(
            DefaultPlugins
            .set(WindowPlugin {
                primary_window: Some(game_window()),
                ..default()
            })
        )
        .add_plugin(EditorPlugin::default())
        .add_startup_system(startup)
        .run();
}
@InnocentusLime InnocentusLime changed the title Panning breaks with a customly sized window Panning breaks when a customly sized app window is used Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant