leapmotion / LeapMotionCoreAssets

Unity Assets for Leap Motion v2 Skeletal Tracking
Apache License 2.0
166 stars 81 forks source link

Feature leap ipd #75

Closed GabrielHare closed 9 years ago

GabrielHare commented 9 years ago

Aligns virtual cameras to Leap cameras, without modifying Oculus code. Updates QuickSwitch to also toggle alignment.

Because Oculus uses LateUpdate to position their cameras it is necessary to override this by enforcing execution order in a non-project-specific way. This is accomplished by controlling the order in which scripts are enabled.

To test:

When the oculus position tracker is working, there should be almost no drift between the real and virtual worlds. To test this, choose a passthrough scene (I recommend VRWidgets or PassthroughTouchGlow) and align a real object with a virtual one, then examine from multiple perspectives. So long as the oculus position tracking is working, the alignment should remain. NOTE: Oculus filters its rotation tracking heavily. Consequently, the virtual objects will lag behind the real objects when ones head is rotating.

RandomOutput commented 9 years ago

This seems to break the VR Widgets scene hard. The passthrough quad becomes misaligned as the camera rotates, appears to warp in scale, and sometimes is culled from the cameras entirely. Kicking it back for now.

GabrielHare commented 9 years ago

Synced with develop and found the source of the error. Replaced CameraRig with PlayerController in scenes (such as VRWidgets) where head position matters. Reviewed all VR scenes - they work for me.