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

checkbutton node passes mouse input to game loop #47443

Open
samtsejerome opened this issue Mar 28, 2021 · 2 comments
Open

checkbutton node passes mouse input to game loop #47443

samtsejerome opened this issue Mar 28, 2021 · 2 comments

Comments

@samtsejerome
Copy link

Godot version:
3.2.3

OS/device including version:
Macbook pro running macos 10.15.6
Issue description:
my game use mouse input to control the player, and a checkbutton to pause/unpause music, but clicking the checkbutton to change music status makes my player jump - I set the mouse filter to stop for thecheck button but its still an issue. (see attached example project )

Steps to reproduce:

  1. create a UI scene with a checkbutton on it
  2. 2 instance the UI scene into your main scene
  3. assign mouse click to an input via the input map
  4. create game logic using newly assigned input

expected result: can use checkbutton without affecting game logic
actual result:
cclicking the checkbutton also results in the input map input being generated influencing gameplay (there doesnt appear to be a way around this.)

checkbutton_issue.zip

Minimal reproduction project:

@Calinou
Copy link
Member

Calinou commented Mar 28, 2021

Use _unhandled_input() to handle the player's "action" input instead of _input(). This way, input handled by other nodes won't be passed to the player.

@Calinou
Copy link
Member

Calinou commented Apr 10, 2021

@samtsejerome Did you find a solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants