#Can't use mouse in game with `bevy_editor_pls`

4 messages · Page 1 of 1 (latest)

copper folio
#

My game is supposed to use the mouse, but with bevy_editor_pls installed, in its default configuration, I don't seem to have access to the cursor position. Is there a way to configure bevy_editor_pls to change this? I would be willing to disable entity picking, since it isn't useful for my game.

wary palm
#

I don't seem to have access to the cursor position
Do you mean that if you have bevy_editor_pls installed you can't access the mouse cursor position from a system?

my current prototype uses bevy_editor_pls and something like bellow works for me:

pub fn mouse_input(windows: Res<Windows>) {
    let window = windows.get_primary().unwrap();

    if let Some(position) = window.cursor_position() {
        println!(":?}", position);
    }
}
copper folio
#

Huh, I might be using the cursor moved events. I’ll check later

copper folio
#

Ok looks like I'm using CursorMoved and CursorLeft events. I'll see if it works with Res<Windows> instead