Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
keshavpeswani's avatar
keshavpeswani
Honored Guest
8 years ago

Unity and Rift | Physical Mapping of HMD with respect to web camera in real space to unity space

Hi, 
I have a web camera that is used to track objects and display in unity. This web camera is mapped to unity camera positioned at (0,0,0) and all tracked real world objects are shown with respect to this camera in unity. I have oculus enabled in unity. As soon as I start the game scene with oculus enabled, the HMDin unity starts moving as per HMD movement, but at arbitrary position. I want HMD to be positioned in unity in the same space as in real world. For this, i have web camera mounted on rift's IR camera, but it doesn't work out, HMD starts at arbitrary position in unity. Can you tell me how to do this . I basically need HMD's position wrt to web camera from real space in unity space where we have web camera at 0,0,0. How can it be done ?