Skip to main content
Up and Coming
November 15, 2013

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
    This topic has been closed for replies.

    4 replies

    Up and Coming
    November 15, 2013
    Found something helpful in this forum here:

    https://developer.oculusvr.com/forums/viewtopic.php?f=37&t=952

    Just pressing "C" the crossair appears. But how do you make the crossair appear via script ?

    And also there is the OVR main menu below the crossair - how can you remove this? Found the VRVars in the MainMenu Script, but i'm not sure how to exclude some Vars from showing.
    greetings from bavaria
    Up and Coming
    November 15, 2013
    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.
    Inspiring
    November 16, 2013
    Yep, looks like a bug. I will see about getting this fixed.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    November 20, 2013
    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);
    }

    }
    }