I’m working on a project on the Quest, but on my dev machine I have a Vive so I’m using OpenVR rather than the Oculus SDK. Is there some way to have the Quest builds offset from the floor properly the way the Vive automatically does when I’m testing in the editor? The Quest clearly knows where the floor is because the guardian stuff is set up, but it doesn’t seem to want to use that in the tracking data. I tried throwing the TrackedPoseDriver onto the camera (Device:Generic XR Device, Pose Source: Head) to see if that might help, but it doesn’t seem to change anything.
No one else out there trying to use Oculus Quest with OpenVR?
Seems likely that its an issue where Oculus doesn’t like to play nice with open platforms, but has no one found a workaround? I don’t want to have people placing their controllers on the floor to calibrate every time!
for those wondering, the answer was:
UnityEngine.XR.XRDevice.SetTrackingSpaceType( UnityEngine.XR.TrackingSpaceType.RoomScale );
Aaron-Meyers, thank you for confirming the solution to the Quest tracking issue.
I am just learning unity, but I am trying to use the Quest to walk inside my Sketchul models.
Where would I need to add the code you posted here?
Anywhere really… you just want to call it once when your scene starts so I’d recommend putting it inside an Awake() method on any MonoBehaviour in your scene.
Aaron-Meyers. Do I need to add it to an empty game object? And can I just have the code you showed:
UnityEngine.XR.XRDevice.SetTrackingSpaceType( UnityEngine.XR.TrackingSpaceType.RoomScale );
Or do I need to add…public class and a name etc, and also the brackets? {?
I have looked at other scripts / codes that seem to have lots of info in them.
This shows how little I understand, but to get it to work on my Quest I just need to know this one thing! For now.
Yes, it would need to be on a game object in your scene. Create a new C# script in Unity and name it whatever you want. You could just put that one line exactly as it is inside the Start() function that it will automatically create in the C# file. Then put that C# file you created on an empty game object in the scene.
Thank you very much Aaron-Meyers. I will give that a go.
Hi Aaron-Meyers, sorry I need your help again please. I have now got an error message: Assets\XRDevicetracking.cs(8,60): error CS1001: Identifier expected.
I added your code in the following way…
public class XRDevicetracking : MonoBehaviour
{
//Start is called before the first frame update
Void Start(UnityEngine.XR.XRDevice.SetTrackingSpaceType(UnityEngine.XR.TrackingSpaceType.Roomscale)
{
}
// Update is called once per frame
Void update ()
{
}
}
I assume I have got some brackets wrong?
void Start()
{
UnityEngine.XR.XRDevice.SetTrackingSpaceType(UnityEngine.XR.TrackingSpaceType.Roomscale)
}
you had the function call as a parameter
Thank you dwattintellisoft
i still can’t figure out the script! I still have error messages.
Please see the photos attached of the errors and the code.
try starting over and name your script something else. “new” is a reserved word in C# (and most programming languages) so using it for the name of a class is asking for trouble.
Aaron-Meyers, thank you. But does the script seem ok? Or is there too many brackets etc?
Now there is an error saying…
Assets\XRDeviceTracking.cs(10,79): error CS0117:’TrackingSpaceType’ does not contain a definition for ‘Roomscale’
void Start()
{
UnityEngine.XR.XRDevice.SetTrackingSpaceType(UnityEngine.XR.TrackingSpaceType.RoomScale);
}
RoomScale insted of Roomscale