Hi, I am back again with another problem.
This time, I cannot seem to get the L2 and R2 axis to return a value other than 0 when using a PS5 controller. (It uses the same axis when plugged in using a usb-c cable, just had a better grip than an xbox controller and it works without much of a problem so far.)
The controller is also fully detected on any online testers I have found so far, including the L2 and R2 axis.
I am using this code which should work according to the doc since it's on the same axis as a regular controller:
extends KinematicBody
var steerValue = 0
var acceleration = 0
var deadZone = 0.2
# Called when the node enters the scene tree for the first time.
func _ready():
for action in InputMap.get_actions():
InputMap.action_set_deadzone(action, deadZone)
func _unhandled_input(event):
steerValue = Input.get_action_strength("steerright") - Input.get_action_strength("steerleft")
# This is the part that fails to return anything but 0.
# The Input in the project settings is set to Axis 7+ (R2), Same happens if I set it to Axis 6+ (L2).
# Using both R2 and L2 in the button inputs category works, but doesn't return a float which would be important in this situation without using a less performant alternative.
acceleration = Input.get_action_strength("accelerate")
print(acceleration)
Would anyone happen to have an idea as to why Axis 6+ and Axis 7+ always returns 0 when printing them and how to fix it?
Thank you in advance for your help :)
Ps. I have a small suspicion that it will most likely work out fine whenever I get steam implemented on it since it could be a drivers issue as there aren't any official drivers for windows but through steam or by connecting the controller directly through the cable, but I would love to be able to do tests before having to add steam on top.