Hey everyone,
I’m happy to let you know that we’ve just released a major update to our Unity assets, and are working on another important release on the Unreal front.
Earlier this summer, we hit roadblocks with our Unity integration due to major changes introduced with the native VR plugin. These changes effectively broke our Image Hands and augmented reality capabilities, leading to different setups for AR and VR. As of yesterday, however, we’re back on track with full support for Oculus 0.7! You can get them here: https://developer.leapmotion.com/downloads/unity.
Bringing passthrough back into our Unity assets was a real challenge, as Unity doesn’t provide any built-in feature for changing the distance between the virtual cameras. (This is necessary for the infrared passthrough from the Leap Motion cameras.) Fortunately, we reached a solution! For all you VR lovers out there, here’s how it works.
To correct for the interpupillary distance (IPD) and forward offset of the Unity Integrated VR cameras, we looked at the separation of the cameras as set by Unity. From there, we scale the parent transform of the two cameras, such that the world space separation of the cameras is the intended distance.
But wait! This also has the effect of scaling the motion of the cameras (head tracking). To compensate for this, we observe where Unity places the cameras relative to the parent transform, and extrapolate the position where the cameras would have been if the parent transform hadn’t been scaled. We then move the parent transform to account for the scaling and place the cameras in the proper position. We also add an additional offset to the parent transform to achieve the forward offset we need to put on the cameras. At the same time, we also counter-scale things like the Leap Motion Hand Controller so that they appear at the proper world scale.
VR is evolving very rapidly, and we’re excited to be a part of it with you. Thanks for all your support and patience as we work to bring you the resources you need to bring your 3D Jam projects to the next level. We’ll have more details about our Unreal update soon, so stay tuned.