Forum Discussion
cyril3d
13 years agoHonored Guest
IPD settings and key mapping
Hi
I can't find which file contains the 0.064 IPD except the CameraController.cs file but even if I change the IPD value in this file and buid the project, when I press the space bar in the demo the default value is STILL 0.064 !!
Searching the whole project I can't find any other file with the 0.064 value.
Moreover I can't decrease the IPD value, just increase it with the =/+ key (it's a french keyboard).
So where is the file containing the piece of code telling which key is assigned to the IPD increase/decrease please ?
thanks
Cyril
I can't find which file contains the 0.064 IPD except the CameraController.cs file but even if I change the IPD value in this file and buid the project, when I press the space bar in the demo the default value is STILL 0.064 !!
Searching the whole project I can't find any other file with the 0.064 value.
Moreover I can't decrease the IPD value, just increase it with the =/+ key (it's a french keyboard).
So where is the file containing the piece of code telling which key is assigned to the IPD increase/decrease please ?
thanks
Cyril
21 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionIt may just be an issue of the editor taking precedence over the default value in code.
Have you tried changing the IPD within the editor? - CosbyTronHonored GuestI'm not seeing an IPD setting int he inspector. You can set the Eye Center Position, but not the IPD.
- cyberealityGrand ChampionAh, yes. The IPD is private, I was looking at the test IPD variables I added.
- cyril3dHonored GuestOk, I modified the unity script to map new keys to increase and decrease the IPD. Now in my rebuilt tuscany demo I can increase and decrease the IPD.
... or so I thought since the HUD displays modified IPD but the 3D simulation doesn't change!
I can't see any difference with a IPD of 20 mm or 80 mm !!!
My initial guess was that thsi IPD value is not used in the simulation but other people on the forums claimed modyfing the IPD helped them accepting the demo and reducing the nausea.
any idea please?
thanks
cyril - CosbyTronHonored GuestI don't want to make too broad an assumption, but I'm willing to bet its psychosomatic in some cases (people feeling an improvement, but no real change having taken place). Three of us have tried to fix the problem through code and we've all encountered the same issue, so I think it's safe to call it a potential bug in the current OVR Unity implementation.
I'm not sure if posting in this forum is the best way to report it, or if there's a more formal way. I'll investigate :-) - cyberealityGrand ChampionOk, I found out whats going on.
You have to use a function called "SetIPD()" in OVRCameraController. Just setting the value manually will not work. - CosbyTronHonored GuestNo luck with SetIPD() either. SetIPD() is changing the same unchangeable variable in OVRCameraController. I tried using it on a delay, in case some other Start code was overwriting it. Here's the little test script I used, if you want to experiment (add to an empty, select your OVRCameraController in the inspector):
using UnityEngine;
using System.Collections;
public class IPDSetter : MonoBehaviour {
public OVRCameraController ovrCam;
public float myIPD = 100.0f;
public float setWait = 5.0f;
// Use this for initialization
void Start () {
StartCoroutine(NewIPD(myIPD));
}
IEnumerator NewIPD(float ipd)
{
WaitForSeconds wait = new WaitForSeconds(setWait);
yield return wait;
print ("Setting IPD to " + ipd.ToString());
ovrCam.SetIPD(ipd);
}
}
Sorry to harp on this, just seems pretty critical to the Rift/Unity implementation. - LaurentMTHonored GuestI've just done some tests on my laptop and everything works on my side.
I can change IPD using '=' and "-" (see video).
@cyril3d : I had the same problem with azerty keyboard. Another solution (if you don't want to modify OVR scripts) is to temporarily switch the keyboard in QWERTY mode when you want to do the setup and then register the settings which you can retrieve later with "Fx" keys (that you can use in AZERTY mode).
@CosbyTron I've tested your script and it works on my side. Cameras are spaced after a delay.
Which version of the unity package do you use ? On my side, I've done the tests with 0.2.2. There is some modifications in the use of IPD between 0.1.5 and 0.2.2. May be it could explain that we have different results. - CosbyTronHonored GuestThanks Laurent! Turns out I had failed to back out some changes I made when I was testing the original problem that were preventing SetIPD from working.
Thanks all! Sorry for hitting the panic button. The initial problem is still weird, but so long as SetIPD works, I'm a happy camper :-) - LaurentMTHonored Guest
"CosbyTron" wrote:
Thanks Laurent! Turns out I had failed to back out some changes I made when I was testing the original problem that were preventing SetIPD from working.
Thanks all! Sorry for hitting the panic button. The initial problem is still weird, but so long as SetIPD works, I'm a happy camper :-)
No problem. Glad to know that it works on your side.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 2 months ago