Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

NilDev Directional Movement 2D

An asset by NilDev
The page banner background of a mountain and forest
NilDev Directional Movement 2D hero image

Quick Information

0 ratings
NilDev Directional Movement 2D icon image
NilDev
NilDev Directional Movement 2D

NilDev Directional Movement 2D is a lightweight input abstraction layer for Godot 4 that unifies directional movement across keyboard, mouse, and touch controls.The library interprets player intent and returns a normalized movement vector that can be applied to any movement system (for example CharacterBody2D velocity or custom physics).Unlike typical movement scripts, this addon separates input handling from movement logic and supports multiple input methods automatically. This makes it useful for cross-platform projects targeting desktop and mobile devices.Features:• Keyboard directional input (InputMap based)• Mouse directional movement• Touch / virtual joystick style movement• Deadzone handling• Configurable maximum movement radius• Motion timeout support• Automatic input source prioritization (touch > mouse > keyboard)• Lightweight and engine-agnostic designThe addon does not replace Godot's physics or movement systems. Instead, it provides a clean directional vector that can be applied to any gameplay system.Example usage:var direction = movement.calculate_movement(player_position)velocity = direction * speedmove_and_slide()This addon is designed for top-down movement systems, mobile-friendly games, and projects that require consistent directional input across multiple platforms.

Supported Engine Version
4.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
1 day ago
Git URL
Issue URL

NilDev Directional Movement 2D is a lightweight input abstraction layer for Godot 4 that unifies directional movement across keyboard, mouse, and touch controls.

The library interprets player intent and returns a normalized movement vector that can be applied to any movement system (for example CharacterBody2D velocity or custom physics).

Unlike typical movement scripts, this addon separates input handling from movement logic and supports multiple input methods automatically. This makes it useful for cross-platform projects targeting desktop and mobile devices.

Features:
• Keyboard directional input (InputMap based)
• Mouse directional movement
• Touch / virtual joystick style movement
• Deadzone handling
• Configurable maximum movement radius
• Motion timeout support
• Automatic input source prioritization (touch > mouse > keyboard)
• Lightweight and engine-agnostic design

The addon does not replace Godot's physics or movement systems. Instead, it provides a clean directional vector that can be applied to any gameplay system.

Example usage:

var direction = movement.calculate_movement(player_position)
velocity = direction * speed
move_and_slide()

This addon is designed for top-down movement systems, mobile-friendly games, and projects that require consistent directional input across multiple platforms.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
NilDev Directional Movement 2D icon image
NilDev
NilDev Directional Movement 2D

NilDev Directional Movement 2D is a lightweight input abstraction layer for Godot 4 that unifies directional movement across keyboard, mouse, and touch controls.The library interprets player intent and returns a normalized movement vector that can be applied to any movement system (for example CharacterBody2D velocity or custom physics).Unlike typical movement scripts, this addon separates input handling from movement logic and supports multiple input methods automatically. This makes it useful for cross-platform projects targeting desktop and mobile devices.Features:• Keyboard directional input (InputMap based)• Mouse directional movement• Touch / virtual joystick style movement• Deadzone handling• Configurable maximum movement radius• Motion timeout support• Automatic input source prioritization (touch > mouse > keyboard)• Lightweight and engine-agnostic designThe addon does not replace Godot's physics or movement systems. Instead, it provides a clean directional vector that can be applied to any gameplay system.Example usage:var direction = movement.calculate_movement(player_position)velocity = direction * speedmove_and_slide()This addon is designed for top-down movement systems, mobile-friendly games, and projects that require consistent directional input across multiple platforms.

Supported Engine Version
4.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
1 day ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers