Check Room

In the visionOS App, I want to detect whether the user is in the room. My idea is as follows:

Check whether there are walls around the user

May I ask how to do it? Thanks!

Answered by Vision Pro Engineer in 809466022

Hello @lijiaxu,

This sample might be a good place to start.

If I correctly understand your question using a WorldTrackingProvider will tell you about anchors in the space (walls, tables, floors etc). The above linked sample has several samples linked in the See Also section that I think might be helpful as well.

If you want to detect when a person running your app is in a particular room (instead of being in one of their rooms) you might find this sample helpful.

Accepted Answer

Hello @lijiaxu,

This sample might be a good place to start.

If I correctly understand your question using a WorldTrackingProvider will tell you about anchors in the space (walls, tables, floors etc). The above linked sample has several samples linked in the See Also section that I think might be helpful as well.

If you want to detect when a person running your app is in a particular room (instead of being in one of their rooms) you might find this sample helpful.

Check Room
 
 
Q