viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.29k stars 481 forks source link

Portal Drifting #709

Open mazhang2718 opened 5 years ago

mazhang2718 commented 5 years ago

Is there a guideline for how to best ensure that there is no drifting when placing a Portal or 3D object? We are setting the portal in front of the user (similarly to the Figment app), only after getCameraOrientationAsync and performARHItTestWithRay is called, and _onTrackingUpdated has TRACKING_NORMAL.

Half of the time, the portal is placed perfectly still to where we want it; but several times, the portal drifts 5-10 degrees around the position. Are there functions other than the ones listed above, or camera conditions (moving the camera around, lighting, increasing the time in the scene before the portal is loaded, etc) that will best ensure that there is no drift at all with the portal? We can provide code or video if needed. Thanks.

radvani commented 5 years ago

In general placing objects (portals included) as you've described (after TRACKING_NORMAL has been received) should result in stable portals, given sufficient lighting conditions. Have you noticed any difference when you try in different lighting environments or is it seemingly random when it drifts or not? Is this on iOS or Android?