Forum Discussion
owenwp
8 years agoExpert Protege
Play Area Center
I want to place colliders in my game world that line up with the edges of the rectangular play space to prevent interactive things from leaving it.
The Oculus SDK gives you access to the play area bounds as a rectangle, but it is not centered around the tracking origin in floor tracking mode. It seems like there is an arbitrary offset between the origin of the tracking space and the center of that rectangle, and I don't see any way to get it from the SDK.
We are not expected to get the vertices of the bounds and figure it out ourselves right? It seems like it would be tricky to reproduce the extents defined in the Oculus setup tool that way.
The Oculus SDK gives you access to the play area bounds as a rectangle, but it is not centered around the tracking origin in floor tracking mode. It seems like there is an arbitrary offset between the origin of the tracking space and the center of that rectangle, and I don't see any way to get it from the SDK.
We are not expected to get the vertices of the bounds and figure it out ourselves right? It seems like it would be tricky to reproduce the extents defined in the Oculus setup tool that way.
2 Replies
- YbalridExpert ProtegeDid not look into it, but if you get coordinates from the Oculus SDK for something, it's on the same reference than the headset and the Touch coordinates.
I think this referential align "(0,0,0)" with the headset position in the "normal" tracking mode, and if you set it to floor (and you should, really. Makes everything easier, specially if you integrated/plan to integrate OpenVR (Vive) in the future) It's probably using as "(0,0,0)" the position of the headset at startup projected to the ground.
So, yeah, AFAIK it's not like with OpenVR where you get an absolute position within the room space.
The idea would be to get the rectangle "play area" corner coordinates, and divide them by two to deduce the actual center of the play-space. - owenwpExpert ProtegeI am using floor mode as I said, and it only does what you describe if you set it to reset position on start. The center is always in the same place, it is just not the exact center of the box.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device