Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
suppenhuhn's avatar
suppenhuhn
Explorer
12 years ago

Crossair image not visible

Hi!

Here is what i'd like to do:
I have a a small menu attached to the OVRPlayrController. The Script works find but i'd like to tweak it a little bit to increase the usability - i.e turn on the crossair-image when looking down on it.

But there are 2 questions:

1. A crossair image is choosen on the OVRPlayerController but i can't see it at all. Do i have to modify some code to make the crossair image visible?
2. How can i access this image within my NavigationScript ( attached to a dummy object on the right camera )



I'm using Unity 4.3 Pro

4 Replies

Replies have been turned off for this discussion
  • vajra3d's avatar
    vajra3d
    Honored Guest
    Yeah, that's a bug with the latest 2.5 version. Whenever you press the "c" button to access the cross-hair it also calls up a non-functional version of the main menu along with it.
  • There is a very simple fix for this. Find void GUIShowVRVariables() in OVRMainMenu and replace it with this:

    	// GUIShowVRVariables
    void GUIShowVRVariables()
    {
    bool SpaceHit = Input.GetKey("space");
    if ((OldSpaceHit == false) && (SpaceHit == true))
    {
    if(ShowVRVars == true)
    ShowVRVars = false;
    else
    ShowVRVars = true;
    }

    OldSpaceHit = SpaceHit;

    int y = VRVarsSY;

    if (ShowVRVars)
    {
    // Print out auto mag correction state
    MagCal.GUIMagYawDriftCorrection(VRVarsSX, y,
    VRVarsWidthX, VRVarsWidthY,
    ref GuiHelper);

    // Draw FPS
    GuiHelper.StereoBox (VRVarsSX, y += StepY, VRVarsWidthX, VRVarsWidthY,
    ref strFPS, Color.green);

    // Don't draw these vars if CameraController is not present
    if(CameraController != null)
    {
    GuiHelper.StereoBox (VRVarsSX, y += StepY, VRVarsWidthX, VRVarsWidthY,
    ref strPrediction, Color.white);
    GuiHelper.StereoBox (VRVarsSX, y += StepY, VRVarsWidthX, VRVarsWidthY,
    ref strIPD, Color.yellow);
    GuiHelper.StereoBox (VRVarsSX, y += StepY, VRVarsWidthX, VRVarsWidthY,
    ref strFOV, Color.white);
    }

    // Don't draw these vars if PlayerController is not present
    if(PlayerController != null)
    {
    GuiHelper.StereoBox (VRVarsSX, y += StepY, VRVarsWidthX, VRVarsWidthY,
    ref strHeight, Color.yellow);
    GuiHelper.StereoBox (VRVarsSX, y += StepY, VRVarsWidthX, VRVarsWidthY,
    ref strSpeedRotationMultipler, Color.white);
    }

    }
    }