0 votes

I currently have a viewport within my 2D screen containing a mini game. I am passing the input from my root viewport to my subviewport as follows:

func _input(event):
if event is InputEventMouse:
    var ev = event
    ev.position -= Vector2(150, 108)

This works great except for the fact that i also have buttons in the root viewport that I need to interact with and changing the of my ev variable seems to through the event input off for the root viewport as well. Is there a way to separate the two then one doesn't affect the other?

in Engine by (295 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.