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
asked May 28 in Engine by Nikola-Milovic (37 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".

answered May 28 by njamster (8,986 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.