Turn PS Move into an Air Mouse, with out need the camera
Please make FreePIE work without the camera, just like an Air Mouse make the internal IMU sensors become the mouse.
Comments (19)
-
repo owner -
repo owner - changed status to wontfix
Wont fix - not possible with FreePIE IO plugin
-
I was wondering if using the FreePIE IO for the buttons is necessary since they can be detected natively using the joystick[0].getDown(1)) method. This would then free up some of the indices.
-
repo owner I wasn't aware of that. I can't seem to get it to register within FreePIE, but I am able to see button presses in the game controller settings within Windows.
If i can figure out why I'm not able to see button input within freepie using its joystick support, I'll switch from passing button information to raw sensor data.
-
Hi :) . Just curious if you've managed to figure it out? The following script is what I used and just incremented "i" until I got a response if that helps.
i=0 diagnostics.watch(joystick[i].getDown(0)) diagnostics.watch(joystick[i].getDown(1)) diagnostics.watch(joystick[i].getDown(2)) diagnostics.watch(joystick[i].getDown(3)) diagnostics.watch(joystick[i].getDown(4)) diagnostics.watch(joystick[i].getDown(5)) diagnostics.watch(joystick[i].getDown(6)) diagnostics.watch(joystick[i].getDown(7)) diagnostics.watch(joystick[i].getDown(8)) diagnostics.watch(joystick[i].getDown(9)) diagnostics.watch(joystick[i].getDown(10)) diagnostics.watch(joystick[i].getDown(11)) diagnostics.watch(joystick[i].getDown(12)) diagnostics.watch(joystick[i].getDown(13)) diagnostics.watch(joystick[i].getDown(14)) diagnostics.watch(joystick[i].getDown(15)) diagnostics.watch(joystick[i].getDown(16)) diagnostics.watch(joystick[i].getDown(17)) diagnostics.watch(joystick[i].getDown(18)) diagnostics.watch(joystick[i].getDown(19)) diagnostics.watch(joystick[i].getDown(20)) diagnostics.watch(joystick[i].getDown(21)) diagnostics.watch(joystick[i].getDown(22)) diagnostics.watch(joystick[i].getDown(23)) diagnostics.watch(joystick[i].getDown(24)) diagnostics.watch(joystick[i].getDown(25)) diagnostics.watch(joystick[i].getDown(26)) diagnostics.watch(joystick[i].getDown(27)) diagnostics.watch(joystick[i].getDown(28)) diagnostics.watch(joystick[i].getDown(29)) diagnostics.watch(joystick[i].getDown(30)) diagnostics.watch(joystick[i].getDown(31)) diagnostics.watch(joystick[i].getDown(32)) diagnostics.watch(joystick[i].getDown(33)) diagnostics.watch(joystick[i].getDown(34)) diagnostics.watch(joystick[i].getDown(35)) diagnostics.watch(joystick[i].getDown(36)) diagnostics.watch(joystick[i].getDown(37)) diagnostics.watch(joystick[i].getDown(38)) diagnostics.watch(joystick[i].getDown(39))
-
repo owner I'm not sure what I was doing differently, but copy/pasting that into my script seems to work.
-
reporter so pasting this script to FreePIE makes it work as airmouse without camera ?
-
repo owner No. This allows button input to work without using PSMoveFreepieBridge. I'll have a version with sensor data support uploaded shortly.
-
repo owner - changed status to open
-
repo owner Alpha 4 is up with sensor data support. The included mouse example script also now uses the Gyroscope for movement by default. Position movement is still included, but commented out so you can switch between them by changing which sections are commented.
-
repo owner - changed status to resolved
-
repo owner Just realized the commented out position movement section of the example script is broken. I've reuploaded it with the script fixed.
-
reporter def update(): #define globals global lastX global lastY global cursorScale global pitchSensibility global yawSensibility
#bind left mouse to trigger button #Right mouse to Move button #Middle mouse to Square mouse.leftButton = joystick[0].getDown(20) mouse.rightButton = joystick[0].getDown(19) mouse.middleButton = joystick[0].getDown(15) #Mouse movement using position data #mouse.deltaX = (freePieIO[0].x - lastX) * cursorScale #mouse.deltaY = -1 * (freePieIO[0].y - lastY) * cursorScale #lastX = freePieIO[0].x #lastY = freePieIO[0].y #Mouse movement using Gryoscope, using roll instead of yaw mouse.deltaX =-1 * (yawSensibility * freePieIO[1].yaw) mouse.deltaY = -1 * (pitchSensibility * freePieIO[1].pitch) lastX = 0 lastY = 0
if starting: pitchSensibility = 0.8 yawSensibility = 0.8 lastX = freePieIO[0].x lastY = freePieIO[0].y lastPitch = freePieIO[1].pitch; lastYaw = freePieIO[1].yaw; cursorScale = 10 freePieIO[0].update += update
-
reporter Is it using Sensor Fusion ? https://github.com/cboulay/PSMoveService/wiki/Sensor-Fusion
-
repo owner Nope, just the gyroscope. If you want to try adding it to the example python script, feel free.
-
reporter Do you know if does this bridge to FreePIE works with William Groom's Razer Hydra emulation ?
-
Sure it would but it only sends the data for one PSMove so it would be a bit awkward. I don't know if maybe two instances of this bridge can be run simultaneously.
I'm still hoping to make a proper FreePIE plugin once there is a c# wrapper for PSMoveService. That way we should also be able to use other features like the EXT addons (once they're added to PSMoveService).
-
reporter Thanks William Groom do you have the links for the FreePIE version or dlls i should add to it to make PS Move work as hydra ?
-
Your welcome. The dlls should come with your installation of FreePIE but I prefer to use the old version CyberVillain posted in this mtbs3d thread (which I reposed here).
- Log in to comment
I can't pass the raw sensor data because the Freepie IO plugin I'm using only supports 4 indices for data. PSMoveFreepieBridge is already using three of them (one for position/rotation, the other two for button support) and the raw sensor data won't fit into the remaining struct available.