Plonq / bevy_rts_camera

RTS-style camera controls plugin for Bevy Engine
Apache License 2.0
60 stars 6 forks source link

Window grab mode isn't restored properly #20

Closed TeamDman closed 5 months ago

TeamDman commented 5 months ago

Setting the window grab mode to Confined a la


    app.add_plugins(DefaultPlugins.set(WindowPlugin {
        primary_window: Some(Window {
            cursor: Cursor {
                grab_mode: bevy::window::CursorGrabMode::Confined,
                ..default()
            },
            ..default()
        }),
        ..default()
    }));

storing it somewhere to be used during restoration instead of None should fix it

https://github.com/Plonq/bevy_rts_camera/blob/2136b0b7d8660c3b4964b6fc178d929b5f987cc0/src/controller.rs#L250 https://github.com/Plonq/bevy_rts_camera/blob/2136b0b7d8660c3b4964b6fc178d929b5f987cc0/src/controller.rs#L319

Plonq commented 5 months ago

Fixed in 0.7.1