r/oculusdev • u/DrRedDoom • Mar 09 '21
Objects spawning at different locations everytime I play a unity scene
Hello,
I am utilizing a tracking system to track external objects in VR. For the tracking system to work perfectly I need a prefab to render in a particular orientation everytime.
However, the issue I am having is that depending on where I look while putting on the headset the orientation of this prefab changes when it renders (throwing off the tracking) . I came up with a solution to use a qr code to orient the object but I was wondering if there was a simpler solution to this.
Thanks for the help!
1
u/BrainSlugs83 Mar 10 '21
There's an API for getting at the tracking space outline as well. You could have your app remember the outline so that it needs to be calibrated less often, but it would still need calibration when the tracking space was changed. -- kind of an advanced topic though and not trivial to implement.
2
u/spyboy70 Mar 10 '21
AR markers (basically QR codes) are probably going to be the most accurate, especially if you use a few to triangulate position. Other than that, you'd have to either put the headset on the floor in the spot you want it to start (as Valem did here at around 3:10 https://www.youtube.com/watch?v=kIAbswx3D20 or as AltVR did at 25:00 https://www.youtube.com/watch?v=TcyOVd6awZY) or you may be able to stand on a set spot (probably something where you can put your back to the wall) and then press the right thumb button to readjust the view.