[Plugin] PSMove input - OSX and Windows x64


See the sample project here. I will try to keep the README up to date with all necessary instructions. The docs are still a little bare, but feel free to post here with questions and I’ll try to update the docs as time allows.

  1. The plugin currently assumes you are using a PSEye with the PS3EYEDriver as this is the only driver that works with MSVC 64-bit, required by UE4 Editor. PS3EYEDriver is GPL’d, so you can’t publish closed-source games using this driver. We will eventually get around this by turning the psmoveapi into a server/client model, where the server will be GPL’d and the client - the only part that needs to go in your project - will have a much more permissive license. In the meantime, you can build for 32-bit and use the non-free 32-bit drivers from CodeLaboratories. Your users would be required to purchase these $2 drivers too.

  2. Getting the PSMove paired to the computer can be quite tricky. It seems to depend on the bluetooth dongle and possibly what other USB devices are attached during pairing. The good news is that once it is paired, it connects very reliably in the future. If it doesn’t, then you either have a defective controller (e.g., bad battery) or an incompatible bluetooth dongle. We don’t have a list of ‘good’ bluetooth dongles, but the ASUS BT-400 has worked well for me and the other main plugin dev.

  3. It’s pretty sensitive to lighting conditions. Sunlight or fluorescent light sources (& reflections) in the FOV of the tracking camera will cause lots of problems for you.

  4. Everytime you move the PSEye camera, or DK2 camera, you will have to redo a coregistration step. It only takes about 20 seconds and it should be good as long as the cameras don’t move relative to each other.

  5. You have to recalibrate the PSMove magnetometer (and other sensors) definitely every time you change rooms, and it’s probably a good idea to do it once per day.

This looks like a solid first release, nicely done :)!

Thank you for releasing the plugin, perhaps I could finally put the two PSMoves I have here to some use. :smiley:

Well, only 1 for now. Though it polls as many controllers as are available, there’s only one instance each of Position and Rotator. I suppose if there are multiple controllers then you may end up with hybrid data in these variables. There’s still a lot left to do but I have to move on with my research. I will make updates as I need them or if there’s a lot of interest from the community, but I’m also more than open to contributions.

amigo, this plugin should work in linux too because the psmoveapi works in linux. You’d have to build the psmoveapi binaries, put them in the correct directory, and edit PSMove.Build.cs. If you end up doing that then please PR it upstream.

Cool, thanks for the heads-up, so I don’t wreck my head why two controllers won’t work. :slight_smile:

As for Linux, I’ll see what I can do - at the moment we are focusing on getting the 4.7.x polished up, in case people want to try it due to some (unforeseen?) GDC interest. :smiley:

This is great! I’ve got it kind of working - I need to have the controller plugged in and i’m only getting the positional data rather than the orientation data but it’s very interesting.

I eventually want to use this to track a real camera/head to make an off-axis projected envionment.

I think there’s some issue as well with the polling speed. I’m using the positional data to drive my camera location and it’s a bit hesitant. It stops and starts rather than giving me smooth tracking. It’s possibly something to do with my hardware setup though.

Sometimes the light doesn’t come on either - is there a way to switch it on manually with a function?

I’ll be watching this plugin with huge interest!


Yeah the plugin needs some work. And to be honest, its current implementation is probably not the right way to do it. I would much rather have a service running in the background that handles all of the psmove connectivity, then simply have UE4 poll the service for the latest data.

Can you try changing the thread priority?

Possible values here:

As for lack of orientation, you may have to run the calibration first. If you built the psmoveapi yourself then it should have built the executable magnetometer_calibration. That writes some data to the psmove’s memory (I think). I added the magnetometer_calibration Mac executable to the plugin. I won’t be able to add the Windows one until Tuesday.

If you want to build it yourself then you can do that. I’m trying to get my changes to the psmoveapi merged upstream but it’s taking a while. An added complication is that it uses a submodule which is also a little slow to get my changes merged upstream. In the meantime,use my fork, the master branch is up to date.

What platform are you using? Mac, Windows, Linux? I’ve found that the PS3EYEDriver performs fairly poorly in Mac, with many dropped frames. The same hardware running Windows is much smoother. I had some performance increase in Mac using gcc instead of clang. I’ll test that out now.

Are you sure you were getting position and not orientation? When the tracker isn’t working well (room is too bright, spotlight behind you, etc), the orientation still works but the tracker is just noise.

Anyway, I made a bunch of updates today. And now it should support multiple controllers too. I don’t have more than 1 with me to test so I’m not providing instructions yet.

I think the problem is actually with the camera driver (i’m on windows at the moment but i’m developing on both win and mac). I downloaded a camera driver which isn’t the one you’ve specified. I’ve now got that one but i’m trying to work out how this mingw64 thing works. I’ll let you know how it goes. - Also, I can’t effectively get the move to pair with bluetooth - it keeps pairing and dropping - might be a windows 7 thing - the bluetooth stack is a but rubbish I think.



Don’t use MinGW64. The libraries it produces can’t / are very difficult to link in MSVC, which UE4 uses. I’ll put windows binaries up shortly.

As for pairing, it should work better in Windows now. Once it is paired, however, connecting is a different story. In Windows 8.1, I have no disconnects anymore after I made a change to the registry. Maybe a similar change is necessary in Windows 7? I’ve also read the dongle makes a big difference. Some bluetooth dongles (I think Belkin) just work. I have an ASUS BT-400, but that’s Win 8.1.

Ah - ok, so how do I build the driver for the playstation eye? I’ve tried loading the source files into VS but i’m a bit of a VS rookie and i can’t get them to compile. I think i’m trying to make a file called ps3eye_sdl.exe. I don’t have a problem with the UE plugin (as far as I can tell) - It updates the position, but as I said, the responsiveness is intermittent (i’ve got a really high end machine). I wonder if it’s not reporting the orientation because i’m running it over USB?

Thanks for all the help by the way!


In terms of win7 not being that good vs win8.1 - I’m not going to pay for it with windows 10 just around the corner. I’ve installed windows 10 on a partition (I’ve heard it runs UE4 really well and is mostly stable) but I think there’s a problem with the video driver - i’ve got a GTX980 SLI setup and I don’t think it likes it. I think there are some ‘secret’ windows 10 nvidia drivers which might solve the problem but I got no reply when I applied to join the directx12 ‘club’.

Oh! I didn’t even think it would be possible to run it over USB. Yes, that is why you are not getting orientation. Orientation is bluetooth only.

Right, don’t buy win 8.1 now. I think that maybe there might be a similar registry key in Windows 7, and I wonder if changing that will help you too.

You don’t need to build the PS3EYEDriver. It comes baked in to the psmoveapi_tracker if the PS3EYE option is specified at compile time.

PS3EYEDriver performance depends a lot on which libusb driver option you’re using. Did you use Zadig to install libusb-1.0 as the driver for the PSEye camera? If so, which driver option did you use?

I’m working on rebuilding the binaries now. I’ve run into a problem related to the use of the PS3EYEDriver as a submodule in psmoveapi. git submodules are a huge PITA. I’ll update here as soon as I have new binaries.

It turned out that I still had an old environment variable set from when I had to work around a different problem that I’ve since fixed. The plugin repository now contains executable files to help you pair, calibrate, and test the tracker outside of the UE4 environment. Try to see if you can get the test_tracker to give you stable tracking before you use the UE4 plugin.

Ah! That seems much better with the pairing - I think it’s trolling me though with calibration stopped at 99%!

About to try the app - which usb driver would you say is best? Using zadig i’ve chosen libusbK - i’ll cycle through them

Thanks again!

I’m giving up for the night - the camera and the bluetooth’s working but the move’s light won’t come on when it’s time to track.

That’s using the test_tracker application? Run it from a command prompt so you can see its output. Does it report that it found a move controller? Is the move controller’s little red LED on? When the controller’s not connected, you’ll get a “### Found 0 controllers.” I’m not really expecting that though, because it should be connected if you got the calibration app to run. The more likely scenario is that it crashed before it got to that point.

You should go into device manager and uninstall the camera’s (not microphone’s) driver each time before you try to install a new one with zadig. During the uninstall process, make sure to check (or is it uncheck?) the box to indicate you wish to remove the driver file. On my Desktop the WinUSB driver worked best. On my macbook it was the libusub0.sys . Someone else reported libusb0.sys worked best for him too. I don’t think the libusbK ever worked well, and I also think having it there prevented WinUSB from working.

Unfortunately the magnetometer_calibration app has a constant baked in it that sets how much data it needs, but different physical locations have different needs. This really should be changed to something dynamic, or at least use an environment variable. You can try changing the constant and recompiling. Maybe next week I will change it to check for an environment variable and use that if it exists. See an open issue here and the line of code in question here. In the meantime, you can maybe be super vigorous about shaking it around. I don’t want to be responsible for you breaking your controller, so please be careful when doing so. Use the strap and whip it around in big circles. Maybe throw it in the air.

Hi - I got it working with your new source! I’ve been experimenting with the move controlling a camera position (my ‘game’ is like a tv studio and I want to be able to do sweeping camera jib moves - which work!) I’ll be tweaking my settings, the tracking is a bit jittery right now but i’ve been making a smoothing array which works quite nicely.

I’ll let you know how it goes!


Awesome! I’m going to add button support next unless you have specific feature requests.

I made a big update today but I can’t test it in Windows at the moment. Can you please try it?

The interface is quite different to the first release. Please read the README.

Also, I’m interested to hear your strategy for resetting the orientation if you don’t mind sharing.