VRTK icon indicating copy to clipboard operation
VRTK copied to clipboard

Expose IPD value for supported SDKs

Open thestonefox opened this issue 8 years ago • 2 comments

It seems that SteamVR and Oculus both expose the current IPD setting on the headset.

https://github.com/ValveSoftware/openvr/blob/5d0574bf6473130d25dd296ad30206ccd148590b/headers/openvr_api.cs#L3436

(Oculus OVRPlugin.ipd)

It could be a call on the SDK_Headset script.

thestonefox avatar Aug 24 '17 13:08 thestonefox

Actual OpenVR property key name is found here.

If Oculus doesn't provide an event for changes I vote to find a place we already run per-frame logic in already and poll + emit our own event on changes.

bddckr avatar Aug 24 '17 15:08 bddckr

What are the use cases for getting the ipd or whats the original reason for creating this issue? mainly due if an event is required or is a generic function to get the value enough.

I quickly checked the Oculus implementation and its something that you would not want to check per frame :(

public float ipd { get { return Vector3.Distance (OVRPlugin.GetNodePose (OVRPlugin.Node.EyeLeft, OVRPlugin.Step.Render).ToOVRPose ().position, OVRPlugin.GetNodePose (OVRPlugin.Node.EyeRight, OVRPlugin.Step.Render).ToOVRPose ().position); } }

reznovVR avatar Sep 22 '17 19:09 reznovVR