getnamo / leap-ue4

Leap Motion plugin for Unreal Engine 4
MIT License
228 stars 73 forks source link

How to stop hands from attaching to VR headset in VR? #18

Closed janimationd closed 7 years ago

janimationd commented 7 years ago

Hi, I'm trying to make a VR environment with a table-mounted Leap Motion (please trust me, I need to do it).

Is it possible to tell the plugin to stop snapping the hand models' transforms to the VR headset's position, and instead have them relative to some static position?

getnamo commented 7 years ago

Neat use case. To stop auto-adjustment you should look into calling OptimizeForHMD function (https://github.com/getnamo/leap-ue4/blob/master/Plugins/LeapMotion/Source/LeapMotion/Public/LeapController.h#L68) on the LeapController Component. Reverse the default switches to get the behavior you're expecting. Let me know if you run into any bugs on this one.