viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.31k stars 483 forks source link

"Stop Remote Debugging" causes incorrect rending of 3d Object #308

Open bryantAXS opened 6 years ago

bryantAXS commented 6 years ago

Running Viro React 2.7.0

To be clear, this is only happening when I'm NOT remote debugging. When I am debugging, it's rendering fine. I first noticed the issue when downloading a version with Test Flight

Here's a video of the issue. https://cl.ly/3J0R230P401x

bryantAXS commented 6 years ago

As an update, it looks like getBoundingBoxAsync on Viro3DObject is returning 0 values for some of the properties inside the boundingBox variable. Often they are all zero, sometimes one or two have values. Again, this is only happening when not remote debugging.

bryantAXS commented 6 years ago

Another update, I wrapped getBoundingBoxAsync inside a short setTimeout and that seemed to have fixed the issue.

radvani commented 6 years ago

Hi @bryantAXS, thanks for this update. The timeout works, but is obviously not ideal. The underlying problem is that the bounding box is updated once per frame, so immediately after load it may be updated yet. We have a bug filed to fix this, and will target this for our next release. I will keep this issue open until then.