Hi,
I'm building SceneKit app and run into a weird situation. From time to time, I can 't see any virtual objects in AR Scene, but it works perfectly in most cases. And in this moment I can't see any objects, sceneView.pointOfView.position.x or y or z is Nan, rotation is the same.
guard let camera = sceneView?.pointOfView else {
print("Get phonePosition Fail")
return nil
}
// TODO: Don't know why sceneView?.pointOfView gets nothing (NaN). Should find out why.
if camera.position.x.isNaN {
if let session = sceneView?.session {
interrupted?(session)
}
return nil
}
Did anyone handle this case before?