Gamepad in new input system works weird
Hi, I implement new input system using events and everything was cool, until I tried use my Xbox Series controller, camera rotation with stick has much less frequency.
Here I generate C# class in Input Action asset, and inherited interface from it. In OnLook method I just rise event to tell MouseLook class new input data and current input device:
public static event Action<Vector2, InputDevice> Look;
public void OnLook(InputAction.CallbackContext context)
{
Look.Invoke(context.ReadValue<Vector2>(), context.control.device);
}
And in MouseLook I just subscribe to OnLook event and handle event:
InputManager.Look += MouseMove;
private void MouseMove(Vector2 mouseDelta, inputDevice InputDevice)
When I move mouse, camera rotate perfectly, but gamepad has a serius lag. I wrote event counter and get that results: mouse move rise OnLook event 700-800 times per second, stick - only 20 times.
BUT, when I read input in Update, like before, gamepad works well. So question: I made mistake in code or input can't be handled by events?
Your answer
![](https://koobas.hobune.stream/wayback/20220613045556im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Gamepad recognized as joystick and doesn't work 0 Answers
Local multiplayer New Input System 0 Answers
Weird things happening with gamepad input 0 Answers
Why is the InputSystem detecting movement on my PS4 controller, even where there is no input? 0 Answers
Why my joystick axis value when i press them always 1 ( left and right ) ? 0 Answers