Skip to main content
August 19, 2014

"Out of camera range" error on start with lighting issue

Is anyone else experience big lighting problems when you either go out of camera range or hit space to bring up the info? When I start my game, I get an immediate "out of camera Range" warning, and my game lighting is broken (looks like maybe the directional) As soon as I reset the camera with the "R" key, its fixed.
Why do I get an immediate out of camera range message? Why does this message screw with lighting? Is it trying to fade lights out when you go out of range?
Thanks!
    This topic has been closed for replies.

    3 replies

    Inspiring
    August 19, 2014
    The OVRVisionGuide that is instantiated from OVRMainMenu at runtime is checking your head position against a relatively small cube centered around where your position was last "re-centered". If you're just starting up an app this might be in the wrong place (either defaulting to a certain point in space a certain distance away from the camera, or based on wherever the camera is being tracked when you fired up the app, not sure which).

    And yes, it's trying to darken the screen the more you go out of bounds, but since it's checking against an arbitrary cube instead of the camera's actual frustum, it's not always accurate.
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    August 19, 2014
    "HeadTrip" wrote:
    Why do I get an immediate out of camera range message?

    OVRVisionGuide uses a bounds check that is a little too conservative. You might want to call the following in one of your Start() functions:
    			OVRCamera.ResetCameraPositionOrientation(Vector3.one, Vector3.zero, Vector3.up, Vector3.zero);


    There have been several requests to improve the bounds check and expose the camera transform. We will address this in a future release. In the meantime, you could take a look here: viewtopic.php?f=37&t=11779&p=160605#p160605

    "HeadTrip" wrote:
    Why does this message screw with lighting?

    There is a known issue with deferred lighting and shadow intensity when OVRGUI is active, because we change RenderTexture.active in an OnGUI callback. We're still looking into that. For now the options are (1) use forward rendering, (2) disable shadows, or (3) hide the scene/make the GUI opaque.
    August 19, 2014
    great! Calling that in my Start did it, thanks!