Not sure if this is a bug, but if feels like so.
When reading horizontal analogs (surely happens with verticals too), I don´t get a float but a vector 2. This only happens with the Play Station controllers.
This makes reading Play Station devices much more dirty in the code.
//STEERING INPUT
//--------------------------------------------------------------------------------------
var device = InputSystem.GetDevice<Joystick>(); // o usa Gamepad si prefieres
if (device != null)
{
// Si el dispositivo es un mando de PlayStation (DualSense)
if (device.name.Contains("DualSense"))
{
// Lee el Vector2 completo del stick izquierdo
Input_Steer = action_steer.action.ReadValue<Vector2>().x;
}
else Input_Steer = action_steer.action.ReadValue<float>();
}
else if (device == null || !device.name.Contains("DualSense")) Input_Steer = action_steer.action.ReadValue<float>();
//--------------------------------------------------------------------------------------
Input_Accel = ProcessAxis(action_accel.action.ReadValue<float>(), accelConfig); // Procesamos el acelerador
Input_Brake = ProcessAxis(action_brake.action.ReadValue<float>(), brakeConfig); // Procesamos el freno
Input_Clutch = ProcessAxis(action_clutch.action.ReadValue<float>(), clutchConfig); // Procesamos el clutch
Input_Handbrake = ProcessAxis(action_handbrake.action.ReadValue<float>(), handbrakeConfig); // Procesamos el freno de mano
Why not just internally convert those vector 2 to floats?