googlevr / gvr-ios-sdk

Google VR SDK for iOS
http://developers.google.com/vr/ios/
Other
647 stars 191 forks source link

Expose a method [- recenterHeadTracker] in GVRCardboardView #220

Closed stephanecopin closed 7 years ago

stephanecopin commented 7 years ago

This method is available in the NDK as gvr_recenter_tracking(gvr_context *gvr) and in the Android SDK in GvrView as [public void recenterHeadTracker()](https://developers.google.com/vr/android/reference/com/google/vr/sdk/base/GvrView.html#recenterHeadTracker()), but is not available in the iOS SDK. Could it be exposed so we could call it without having to resort to using the NDK?

achuvm commented 7 years ago

+1 here

As a workaround, is there any way to get the gvr_context from a GVRCardboardView so we can access the NDK methods? (I'm fine using Objective-C++).

sanjayc77 commented 7 years ago

Thanks. We are trying to address this in an upcoming release. Stay tuned.

stephanecopin commented 7 years ago

@sanjayc77 Thanks! Can't wait for the new release :)

sanjayc77 commented 7 years ago

Take a look at GVRKit: https://github.com/googlevr/gvr-ios-sdk/tree/master/Samples/GVRKit (also available as a cocoapod). It's GVRRenderer class provides resetting the head pose: https://github.com/googlevr/gvr-ios-sdk/blob/master/Samples/GVRKit/GVRRenderer.h#L85