-
-
Notifications
You must be signed in to change notification settings - Fork 24.6k
Description
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version:
3.2.4.rc1.official
OS/device including version:
Windows 10 (19042.746)
Issue description:
When I plug in a PS4 controller, KinematicBody2D doesn't move properly while using the d-pad buttons or the keyboard. Same occurs if I use DS4Windows to emulate a Xbox 360 controller (XInput).
(!) Note The same code works fine in Godot v3.2.3.stable, both for the PS4 controller (with and without DS4Windows) and the keyboard.
func _physics_process(delta):
velocity = get_direction() * speed
velocity = move_and_slide(velocity)
func get_direction():
var dir: = Vector2.ZERO
dir.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
dir.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
dir = dir.normalized()
return dirSteps to reproduce:
- Open and run the attached project with a PS4 controller connected.
- Move the rectangle on the screen using WASD or the arrow keys, then try to move it using the d-pad buttons.
- The node's movement shouldn't work properly, neither with the keyboard or the controller.
- Disconnect the controller and the rectangle will move without problems using the keyboard.
Repeat steps 1 and 2 in Godot v3.2.3.stable.official and the rectangle will move without problems.
Here you can see how the gamepad registers the buttons pressing without moving the rectangle, same for WASD and arrow keys.
Minimal reproduction project: