Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Play Area Center

owenwpowenwp Posts: 676 Oculus Start Member
edited January 2017 in PC Development
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.
Sanzaru - Programmer

Comments

  • YbalridYbalrid Posts: 247
    Art3mis
    Did 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.
    CV1+Touch; Running on GTX980 - 4770K - 32GB DDR3

    I'm writing a C++ open-sourcre game engine for the Rift http://annwvyn.org/ - https://github.com/Ybalrid/Annwvyn
    For now it's only used for my student projects at my engineering school http://en.esiea.fr/
  • owenwpowenwp Posts: 676 Oculus Start Member
    edited February 2017
    I 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.
    Sanzaru - Programmer
Sign In or Register to comment.