#Input errors and scene hierarchy

1 messages · Page 1 of 1 (latest)

dull sphinx
#

So, I have a Computer scene in my main game scene. Within that Computer scene, there is a computer SCREEN scene. the screen scene need to process inputs, which display on the screen mesh in the computer scene, in the main game scene.

I'm having issues with _input(event : InputEvent) not being recognized in the screen scene. Any assistance?

#

The ONLY way I've gotten it to work is putting it under process() but I really don't wanna do that

static wolf
#

Also your computer screen has Windows-esque paths but forward slashes? HERETIC!

dull sphinx
dull sphinx
#

And also uniqueness

#

Here's the hierarchy for the computer itself

#

I have a feeling it's the Subviewport

#

IT'S NOT

static wolf
dull sphinx
#

The screen scene isn't utilizing _input(event) like, at all

static wolf
# dull sphinx The screen scene isn't utilizing `_input(event)` like, at all

So I tried recreating this. I set the up arrow to change a label text to a random number. If I run just the 2D scene, the input works fine. If I run the 3D scene with the viewport texture, no input is captured.

I know that might not sound like a great deal of help, but it means that this is a normal case (not some weird edge case in your project)

static wolf
#

There may be cleaner ways to handle it, but one method is input forwarding:

#

You can filter input here as needed, etc

dull sphinx
#

Thank you sm

#

It works

#

Just,,,, 218 times

static wolf
#

Oh, that's because you are using pressed, and not just_pressed gdthumbsup

dull sphinx
#

Ah

#

Yea we're all set now

#

Thank you again :]