Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Problems getting started with the plugin #28

Open
Daveiac opened this issue Apr 21, 2016 · 1 comment
Open

Problems getting started with the plugin #28

Daveiac opened this issue Apr 21, 2016 · 1 comment

Comments

@Daveiac
Copy link

Daveiac commented Apr 21, 2016

Hi, I'm having some issues getting to use the plugin and I hope you could help me get started.
First of all my system is Windows 10 x64, MSVC2015, with unreal engine 4.10 and PS3Eye camera. My tracking is working fine in test_tracker.exe, and test_opengl.exe, and I have installed libusb drivers with Zadig.

What I want to achieve is to use the PSMove controller as a cursor on the screen, but I'm having difficulties getting the position of the Move controller. I can run the simple move example and get the Actor moving on the screen as it should, but I do not know where to go from here. I have tried:
Getting the position of the Move controller through blueprints with the PSMoveComponent and MotionControllerComponents with no luck. There seems that an earlier version of the plugin supported this through OnDataUpdated.
I also tried using the plugin through C++, but all I get are compiler errors. I have added the "PSMove" module as a private dependency module in the Bulid.cs file, but I get errors when including the plugin headers. I thought maybe I could use a code like this to access the position:

FPSMoveDataContext *DataContext;
FPSMoveWorker::GetSingletonInstance()->AcquirePSMove(0, DataContext);
FVector Position = DataContext->GetPosition();

If I try to #include "FPSMoveWorker.h" I get the error:
Error C1083 Cannot open include file: 'PSMovePrivatePCH.h': No such file or directory ...\FPSMoveWorker.h 10
And with #include "PSMoveTypes.h" or #include "PSMoveComponent.h" I get the errors:

Error C2653 'PSMove_Button': is not a class or namespace name ...\PSMoveTypes.h 414
Error C2065 'Btn_TRIANGLE': undeclared identifier ...\PSMoveTypes.h 414
...

Anyways, thanks for reading and hopefully one of you guys could help me in the right direction.

@cboulay
Copy link
Collaborator

cboulay commented Apr 28, 2016

I've never tried explicit importing of a plugin as a dependency for another plugin/module. I just drop the plugin in the "Plugins" folder and it works. That shouldn't be necessary for you though.

I'm guessing your application is non-VR, correct? We haven't really tested that.

As I mentioned by e-mail, I don't really have the time to dive back into this while working on other things. But, a simple hack occurred to me. You said you were able to follow the instructions to get an actor that moved with the controller. You can make your motion-controlled actor invisible and non-blocking, then just get its pose on every tick. From there you can project your pose onto your 2D plane (I assume that's what you mean by 'cursor') however you like.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants