Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Deazy |
Hello, I have a problem: When I use my panning/dragging the camera around function it works fine. But if my cursor is hovering over any button in that scene it no longer works.
I have tried moving the nodes around in my scene but it doesn’t help. I don’t know what else should I try. Please help.
Here is the code for the dragging/panning:
func _unhandled_input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
if event.button_mask == BUTTON_MASK_MIDDLE:
position -= event.relative * zoom
you already answered.
mouse works in blank areas of the screen. When it hovers over another node, the function comes to that node.
sorry i use translation
English is not my native language.
ramazan | 2022-09-19 21:23