GUI to intercept input events? (SOLVED)

#1

I’d like my GUI layer to intercept input events from the game objects layer behind it.

It seems that
return true

in the on_input method in the gui script doesn’t prevent the event to be propagated to the game objects layer.

How to do this?

0 Likes

#2

It should. But maybe, now that I think of it, it only prevents input from propagating to the next game object in the input stack. This should be easy for you to try!

A solution might be to move the gui and the script to two different game objects if that is possible?

0 Likes

#3

OK thanks for the clarification. I had the stack in a messy state. That helped figuring it out!

0 Likes