How to get mouse velocity and USB ports?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By BookSloth

I’m trying to make a game that supports multiplayer with two USB mice. I know when two mice are plugged into a computer, they control they same cursor.

I want to therefore find the velocity of each USB mouse so I can have two sprites move across the screen like two custom cursor. Is there a way to determine what usb port a mouse input is from? In addition, is there a way to take the raw velocity data from each specific USB mouse, rather than from the cursor itself?

This is not possible in Godot or in any other piece of software.

This Godot Q&A might be helpful tho

if you truly wish to do this you’d have to read raw input data at the OS level, so you’d have to implement that on your own somehow, maybe a GDExtention? i have no idea honestly.

CollCaz | 2023-05-16 18:05