Forum Discussion
suppenhuhn
12 years agoExplorer
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
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
- suppenhuhnExplorerFound 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. - vajra3dHonored GuestYeah, 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.
- cyberealityGrand ChampionYep, looks like a bug. I will see about getting this fixed.
- boone188Honored GuestThere 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);
}
}
}
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
- 11 months ago
- 1 year ago
- 2 years ago
- 4 months ago
- 5 months ago