Scaling and OVRCameraController
Hi, just wanted to mention that when the OVRCameraController is inside a hierarchy such that the "eyes" should be scaled up or down to something other than 1.0, it adversely affects the eye separation for the two cameras. For example if my player is inside a scene that is scaled down to 0.001 of original size just to keep world coordinates from getting too big, the player's effective IPD ends up being 64 meters instead of 64mm.
I had to make the following changes to fix this (but use at your own risk in case it breaks something elsewhere). I am simply making the eye separation code operate in local space instead of world space. Near the bottom of SetCameraOrientation() in OVRCamera.cs, these two lines:
...should be changed to this:
EDIT: This was not a good fix. See my next post below for a better fix.
I had to make the following changes to fix this (but use at your own risk in case it breaks something elsewhere). I am simply making the eye separation code operate in local space instead of world space. Near the bottom of SetCameraOrientation() in OVRCamera.cs, these two lines:
// Update camera position (first add Offset to parent transform)
gameObject.camera.transform.position = gameObject.camera.transform.parent.transform.position + NeckPosition;
// Adjust neck by taking eye position and transforming through q
gameObject.camera.transform.position += q * EyePosition;
...should be changed to this:
// Update camera position (first add Offset to parent transform)
gameObject.camera.transform.localPosition = gameObject.camera.transform.parent.transform.localPosition + NeckPosition;
// Adjust neck by taking eye position and transforming through q
gameObject.camera.transform.localPosition += q * EyePosition;
EDIT: This was not a good fix. See my next post below for a better fix.
