简体   繁体   中英

UWP Motion Controller input without Unity

I'm writing a UWP application which I want to be able to use also in the Mixed Reality environment as a slate. It's not a 3D app.

All works well except that I would like to take advantage of the motion controller buttons as shortcuts. Everywhere I'm looking, I find an interface for Unity but I can't seem to find anything that would allow to me access the Motion Controller directly from my C# program.

Is it at all possible? And if yes, any pointers in the right direction would be greatly appreciated.

And please... don't ask me why I'm doing this... I'm starting to wonder myself but the project is well advanced and I want to finish it well.

It's possible to access motion controllers from UWP without Unity.

There is class SpatialInteractionManager . You need to get an instance by GetForCurrentView(). Then call every frame GetDetectedSourcesAtTimestamp() for getting sources like motion controllers. The details are in sample SpatialInteractionSource

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM