0 votes

So here's my setup
https://imgur.com/a/5y1WstA and I cannot get my two texture buttons to detect any clicks. The canvas layer is layer = 2 and this is the camera code I am using.
(also the buttons under the UI control node also cannot be clicked)
The camera isnt following anyone, just need it to pan around when the user drags.

func _input(event):
if event is InputEventScreenDrag:
    position += event.relative.normalized() * -1 * camera_speed
in Engine by (39 points)

1 Answer

0 votes

If the CanvasLayer's layer-property is set to 2, it's drawn above your buttons. Thus, If anything in the ui-node stops your mouse inputs, they won't reach the buttons. Try setting the mouse_filter-property of your ui-node to "Ignore".

by (10,311 points)
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 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 webmaster@godotengine.org with your username.