Good day!
So working in this project I have been using the new input system and I must say I’ve been loving it! the only issue I’ve found until now is that the vibration of the controllers doesn’t work. In windows works as in the Editor of different machines the controllers vibrate and behave as I’d like, but can’t seem to work on Apple products. Not even on the editor.
I’m using the following code to vibrate all devices that are gamepads:
public void DeviceHapticFeedback_All(float sharpness, float intensity)
{
if (GameSettingsController.Instance.GetSetting().IsSettingsOnFor[GameSettingConstOptions.HAPTIC_STATUS])
{
for (int i = 0; i < InputSystem.devices.Count; i++)
{
if (InputSystem.devices[i] is Gamepad)
{
(InputSystem.devices[i] as Gamepad).SetMotorSpeeds(sharpness, intensity);
StartCoroutine(stopVibration_All(i, 0.2f));
}
}
}
}
private System.Collections.IEnumerator stopVibration_All(int indexController, float timeToWait)
{
yield return new WaitForSeconds(timeToWait);
(InputSystem.devices[indexController] as Gamepad).ResetHaptics();
}
Again in windows works like a charm, but in Mac even if the code is executed, nothing happens. Anyone has any clues?