mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
2d movement cs event par
Co-authored-by: Raul Santos <raulsntos@gmail.com>
This commit is contained in:
co-authored by
Raul Santos
parent
59de1556d2
commit
8a868a4808
@@ -254,7 +254,8 @@ on the screen will cause the player to move to the target location.
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionPressed("click"))
|
||||
// Use IsActionPressed to only accept single taps as input instead of mouse drags.
|
||||
if (@event.IsActionPressed("click"))
|
||||
{
|
||||
_target = GetGlobalMousePosition();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user