We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 199fb54 commit a81cc1bCopy full SHA for a81cc1b
tutorials/2d/2d_movement.rst
@@ -254,12 +254,9 @@ on the screen will cause the player to move to the target location.
254
255
public override void _Input(InputEvent @event)
256
{
257
- if (@event is InputEventMouseButton eventMouseButton)
+ if (Input.IsActionPressed("click"))
258
259
- if (eventMouseButton.ButtonIndex == MouseButton.Left && eventMouseButton.Pressed)
260
- {
261
- _target = GetGlobalMousePosition();
262
- }
+ _target = GetGlobalMousePosition();
263
}
264
265
0 commit comments