Skip to main content
New Participant
April 29, 2016
Solved

Using rift CV1 without the sensor

  • April 29, 2016
  • 7 replies
  • 10683 views
Hello,

I'm developing a standalone app where the positional sensor isn't needed. The problem is, Oculus home won't run the exe when the sensor is not connected... is there any way to disable this requirement?
We could connect sensors and hide them where the target machines are (somewhere below where the users will be sitting), but I'd rather just disable the need for a connected sensor. Any ideas?
Best answer by Nokhal
Okay, for whatever reasons the Rift don't ask for an incorrectly plugged sensor anymore.   I'm not sure what exactly triggered this

Changes made :

Env :
Updated to sdk 1.3.2 and unity 5.3.4p3

Hardware :
Bit of black tape+paper on the head detect sensor. Black screen is manually handled in-app, AS IT SHOULD. Having access to the sensor without it triggering the oculus app would be great, but aint available, so for now it's movement sensors polled over several seconds.






Software :
Added a      OVRPlugin.ignoreVrFocus = true;  somewhere.
Fullv trash-bin oculus hack class :
using UnityEngine;

#if UNITY_ANDROID
public class ForeGroundSetter : MonoBehaviour {

}
#else

using System.Runtime.InteropServices;
using System;

public class ForeGroundSetter : MonoBehaviour {

[DllImport("user32.dll")]
static extern uint GetActiveWindow();
[DllImport("user32.dll")]
static extern bool SetForegroundWindow(IntPtr hWnd);

IntPtr _hWnd_Unity;

// Use this for initialization
void Start () {
_hWnd_Unity = (IntPtr)GetActiveWindow();
UnityEngine.Debug.Log(_hWnd_Unity);

OVRManager.DismissHSWDisplay();
OVRPlugin.ignoreVrFocus = true; //Okay wtf hack it works.
OVRManager.VrFocusLost += FocusLost;

}

// Update is called once per frame
void Update () {
if (OVRManager.isHSWDisplayed)
{
OVRManager.DismissHSWDisplay();
}
}

public void FocusLost()
{
UnityEngine.Debug.Log("Focus Lost !");


//SetForegroundWindow(_hWnd_Unity); //Not working
}
}

#endif


7 replies

Up and Coming
April 29, 2016
I do not use the sensor too but the Oculus home lets me run my exe. Sometimes it asks me to connect the sensor. I ignore it. Then, I select my app in the white scene (the black square at the middle). ;)

Edit: The pipeline to run your app:
When your app is started, you got a message that says your sensor is unplugged. "Click" on OK. Then go to "Activity" menu (top-left). Then click on the back square at the middle.
demodern2Author
New Participant
April 30, 2016
well, thx, and yeah I've tried that before - but the thing is: I never want anybody to see this white options scene, ever... The whole app has to run without anybody touching anything, from IP power up straight into the exe. It's going to be in a public place, without anybody around fiddeling with any kind of settings or remote controllers. Having unexperienced users decide what to do would be a neckbreaker.
So - I need scriptable possibilities, something that can be disabled in the first place or controlled via network. Dang, I wish I could get rid of the whole oculus home altogether, and have just my exe running like it was possible with the dk2  :/
Participant
May 3, 2016
Bump.

A lot of the companies that uses VR as a product need to have control over the user experience. The DK2 + pre 1.x runtime were allowing that. (You could disable health and safety, launch or disable the oculus runtime via script, etc...)

With 1.3 we are now stuck with a nintendo wii interface except worse, that throw a tantrum and requires an experienced user input.

The oculus is a wonderful piece of hardware, but trying to shoehorn Games for Windows Live : The revenge of UPlay Origin II Steam remastered on top of it is just gonna make me and my team use other headsets if this can't be scrapped/Hidden to the user. Having any part of the store/social/library/whatever being displayed is an absolute No. The health and security warning should be able to being removed, the US is not the only legislation where the rift is used.

This is sad, cause the image quality on the oculus is the best.
Up and Coming
May 6, 2016
+1
With the new 1.x sdk/runtime, you do not have full control of your app any more. -_-' (actually, since the 0.6)
Oculus is no more a "for general case" VR device. It's now a game device. So they developed a steam/uplay/origin like system. For controlling what you do and say what you have to do.
As said @Nokhal,
The oculus is a wonderful piece of hardware, but trying to shoehorn Games for Windows Live : The revenge of UPlay Origin II Steam remastered on top of it is just gonna make me and my team use other headsets if this can't be scrapped/Hidden to the user. Having any part of the store/social/library/whatever being displayed is an absolute No. The health and security warning should be able to being removed, the US is not the only legislation where the rift is used.

This is sad, cause the image quality on the oculus is the best.


Good was the old time where you own your application...
Hope they will change.
NokhalAnswer
Participant
May 10, 2016
Okay, for whatever reasons the Rift don't ask for an incorrectly plugged sensor anymore.   I'm not sure what exactly triggered this

Changes made :

Env :
Updated to sdk 1.3.2 and unity 5.3.4p3

Hardware :
Bit of black tape+paper on the head detect sensor. Black screen is manually handled in-app, AS IT SHOULD. Having access to the sensor without it triggering the oculus app would be great, but aint available, so for now it's movement sensors polled over several seconds.






Software :
Added a      OVRPlugin.ignoreVrFocus = true;  somewhere.
Fullv trash-bin oculus hack class :
using UnityEngine;

#if UNITY_ANDROID
public class ForeGroundSetter : MonoBehaviour {

}
#else

using System.Runtime.InteropServices;
using System;

public class ForeGroundSetter : MonoBehaviour {

[DllImport("user32.dll")]
static extern uint GetActiveWindow();
[DllImport("user32.dll")]
static extern bool SetForegroundWindow(IntPtr hWnd);

IntPtr _hWnd_Unity;

// Use this for initialization
void Start () {
_hWnd_Unity = (IntPtr)GetActiveWindow();
UnityEngine.Debug.Log(_hWnd_Unity);

OVRManager.DismissHSWDisplay();
OVRPlugin.ignoreVrFocus = true; //Okay wtf hack it works.
OVRManager.VrFocusLost += FocusLost;

}

// Update is called once per frame
void Update () {
if (OVRManager.isHSWDisplayed)
{
OVRManager.DismissHSWDisplay();
}
}

public void FocusLost()
{
UnityEngine.Debug.Log("Focus Lost !");


//SetForegroundWindow(_hWnd_Unity); //Not working
}
}

#endif


demodern2Author
New Participant
May 11, 2016
I see we think alike here, with the tape and all... Accepted that as an answer so far... thx.
New Participant
May 17, 2016
Hi...as per my knowledge oculus is a wonderful piece of hardware. Having any part of the
store/social/library/whatever being displayed is an absolute No. I do not use the sensor too but the Oculus home lets me run my exe. Sometimes it asks me to connect the sensor. I ignore it.

pcb assembly