Showing results for 
Search instead for 
Did you mean: 

InputDevice.TryGetBoundaryPoints() returns no points

Level 2

I have been developing a game in VR since 2019, I had originally been building it for steamVR, but just purchased the Oculus Quest 2 and am converting it to work with the Unity XR Interaction Toolkit.

A fundamental feature of the game is it knowing your bounds/guardian.

I am trying to use `InputDevice.TryGetBoundaryPoints()`, but have discovered that is always returning 0 points for the boundary. On investigation on the Unity bug forums, I saw this response to the bug.


> Oculus Plugin currently does not support TryGetBoundaryPoints through Quest Link. We have forwarded the issue to Oculus.


Is this going to be fixed? It pretty hard to debug my code on the quest without access to logs or debugging tools, assuming this returns points even when not run through QuestLink, as my code still doesn't work when installed as an APK, and I have no way of knowing if it is my code at fault, or the function.


Level 5

This call works through QuestLink in the Unity Editor (but requires the Oculus Integration installed):

if (OVRManager.boundary.GetConfigured())
var bounds = OVRManager.boundary.GetGeometry(OVRBoundary.BoundaryType.PlayArea);

 BoundaryType.PlayArea return four corners, BoundaryType.OuterBoundary return the entire shape of the guardian (I believe).

Level 2

Thanks, that is very helpful as a temporary solution. I really hope Oculus fix the issue though, as I don't like having the library included for one API call.

ETA: Actually, when trying this I realised this is not as simple as I thought. To get this to work, I would need to be using OVR for the camera object, which I am not, I don't want to convert the whole project to only work with Oculus, I still need to be using the XR Interaction Toolkit, so that means OVRManager.boundary is null.


Look like I need to wait for Oculus to implement the API fully after all.