jeroenheijmans / sample-godot-node2d-input-handling

Example for Godot 4 input handling when Node2D nodes are involved

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample Godot 4 Input Handlers for Node2D

This sample demonstrates how you could set up input handling for static bodies to support Drag & Drop.

It is strongly related to my other sample on Drag & Drop between Control and Node2D nodes. However, this sample focuses on setting the InputEvent as "handled" instead.

👉 link to the most interesting file

Notes

Be warned! This repository:

  • Was created while learning Godot 4, and is not "expert advice";
  • Will likely not be kept up to date;
  • Might have differences for Godot 3.x and earlier;

Still, it might help someone!

Demo

This is what it should do:

sample-godot-node2d-input-handling-demo-001.gif

About

Example for Godot 4 input handling when Node2D nodes are involved


Languages

Language:GDScript 100.0%