Camera2D node, only 1 child should be dragged... how to do this?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Qws

I’ve Drag effect option in the Camera2D enabled. For player to have some degree of free movement within the Camera2D. But the problem is that the GUI gets same treatment as player node. I don’t want GUI to getting same drag effect as “Hero” KinematicBody2D…

How can I prevent Nodes from getting dragged in Camera2D? So parent node basically only should allow dragging the player child, while the GUI is fixed with the Camera2d.

I’ve example project if you are interested beneath the photo.

Camera node dragging wrong object problem

Project example: test-lab-cameranode.rar - Google Drive

If the GUI elements are Control nodes then MouseFilter may help you.

Ertain | 2018-03-05 21:48

:bust_in_silhouette: Reply From: rustyStriker

set the GUI under a CanvasLayer node, it will print it before repositioning the camera…

do a bit of experiment to really understand how it works

Thanks, this is what I needed… I really need to experiment with it. Pretty complex, need to change Node structure.

Qws | 2018-03-06 15:20