Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
If you want to have objects in your game be clickable, one of the most obvious methods is using a Area2D > Texture + CollisionShape2D. When your mouse interacts with the CollisionShape2D it has mouse motion, mouse exited, and input events.
Note: Control nodes have restrictions, eat up all mouse events, and don't work well with deselecting by clicking outside of any objects
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below, | |
## if you're just starting out...), see this new gist: | |
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd | |
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D | |
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward. | |
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide. |
# SPDX-License-Identifier: Unlicense or CC0 | |
extends Node2D | |
# Smooth panning and precise zooming for Camera2D | |
# Usage: This script may be placed on a child node | |
# of a Camera2D or on a Camera2D itself. | |
# Suggestion: Change and/or set up the three Input Actions, | |
# otherwise the mouse will fall back to hard-wired mouse | |
# buttons and you will miss out on alternative bindings, | |
# deadzones, and other nice things from the project InputMap. |