Hey everyone
I am quite new to Panda3D. I’m using Windows, and am writing an application where I’m trying to control it using several computer mice in parallel. I actually manage to do this as described in the manual (under panda3d.org/manual/index.php/Mouse_Support) using in the config file:
[color=blue]
read-raw-mice #t
and then in the program something like:
[color=blue]
#reading virtual system mouse coordinates; which I actually don’t use
md = base.win.getPointer(0)
x = md.getX()
y = md.getY()
#reading coordinates of physical mouse 1
md1 = base.win.getPointer(1)
x1 = md1.getX()
y1 = md1.getY()
#reading coordinates of physical mouse 2
md2 = base.win.getPointer(2)
x2 = md2.getX()
y2 = md2.getY()
#and so on for a couple more mice…
But one big problem I encounter is that each time I plug something in or out of one of the USB ports, or each time I try to do this on a different computer, all the arrangement of the mice changes; it seems like the number of USB devices present and the order in which the different mice are plugged in matters a lot.
Ideally, I would like to be able to tell it once in the beginning to take the coordinates from the mice connected to particular USB ports. I don’t know how to do this, and while tha manual hints that it’s possible (i.e. that each mouse has a name which uniquely identifies it, based on its product key and port), it never actually explains how to access or use this information.
Can someone help me out here?