cancel
Showing results for 
Search instead for 
Did you mean: 

Aligning world with Guardian Play Area

SharpeGame
Level 3
I seem to be at a loss for I have been working on this problem for the last couple of days.

I am trying to create a game where the player walks through the environment by walking around their play area given it meets the requirements (7 ft x 7 ft). I, however, seem to not be able to make the world align with the play area. I am able to get the play area and calculate where the player is inside of the play area as well as calculate the angle in which the world needs to be rotated to become aligned with the play area. Nothing that I do has seemed to work despite the numbers I have gotten. Has anyone else done this and can give me pointers or a solution on how this might be done?
6 REPLIES 6

MVRKDEV
Level 2
I'm trying to accomplish the same thing with the Quest, so I'll +1 this. Out of curiosity, are you currently building to the device every time you want to test something or are you using the link cable? 

SharpeGame
Level 3

MVRKDEV said:

I'm trying to accomplish the same thing with the Quest, so I'll +1 this. Out of curiosity, are you currently building to the device every time you want to test something or are you using the link cable? 



I have not gotten my oculus link cable yet so unfortunately, I have been building to my quest every time. 

MVRKDEV
Level 2
Ah, I see. I guess I'll just have to abandon the link cable to accomplish this goal until they confirm or deny whether we can access the guardian system with it. I'll let you know if I make any headway with aligning the world to the play area. 

glenneroovy
Level 3

@SharpeGame Did you ever figure this out?

 

btw when using Oculus Link, OVRManager.boundary.GetConfigured() still returns false. To get around this, I just dumped the values returned from OVRManager.boundary.GetGeometry(OVRBoundary.BoundaryType.PlayArea) while running non-Link and use those when testing.

Yes, I did figure it out actually! My problem was that the code I was running was trying to align it using coordinates local to the boundary instead of the boundaries global coordinates. Once I made the conversion everything *worked* as intended. If you would like I can post a breakdown of how I accomplished this or give you some pointers on your own code if you have already attempted it.

Thanks for writing back! I think I understand what you are saying, but any details you wish to share would definitely be helpful for myself and future readers 🙂