0

I'm currently playing with the Leap Motion controller and trying to use it as a controller for the game Surgeon Simulator. If you search for "leap motion oculus rift surgeon simulator", you'll understand my end goal. However, I'm having issues with simulating the right kind of mouse movements on my Mac.

Problem:

The movement in the game seems to work based off of the mouse movement, not cursor location. For example, you can move the mouse infinitely to the left and still see interaction in the game - it never hits an edge. The libraries that I've tried, don't seem to mimic the right behavior.

I've tried autopy's smooth_move, PyUserInput's mouse library, and methods that I found on various blogs including http://www.geekorgy.com/index.php/2010/06/python-mouse-click-and-move-mouse-in-apple-mac-osx-snow-leopard-10-6-x/ and http://metapep.wordpress.com/2009/07/10/control-the-mouse-on-mac-with-python/

Does anyone have insight to what I'm missing? Is there something fundamental about mouse control that I'm not considering?

I'm nearing the point of trying this all out on a Windows machine instead with the pywin32 library or something.

arbylee
  • 1,959
  • 2
  • 12
  • 6

1 Answers1

0
https://pypi.python.org/pypi/PyUserInput/0.1.1

Take a look good sir. This will probably help defeat a lot of your issues. Also, if you finish it let me know :)

Bioto
  • 1,127
  • 8
  • 21
  • I've tried PyUserInput, but the interaction doesn't work the way I need. Moving the mouse with PyUserInput is more like "set the cursor location here" rather than "swipe the mouse in this direction". I have the PyUserInput mouse movements working outside of the game, but the game engine doesn't seem to pick it up. I've also tried incrementally changing the cursor location for a pseudo-swipe, but the game still doesn't recognize it as a swiping motion. Is there something in the library that I'm missing? – arbylee May 30 '14 at 02:15
  • Ive only messed with it once. I have a feeling however that since its in python your going to have a somewhat limited functionality. What you could possibly do is detect when the cursor is on the edge of the screen then reset it to the middle. (Sorry if my grammar is messed up in a bit of pain) – Bioto May 30 '14 at 05:56