Post

Replies

Boosts

Views

Activity

ARSCNView.pointOfView.position contains NaN in x, y, z
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?
0
0
401
Apr ’22
ARSCNView.pointOfView.position contains NaN in x, y, z
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?
Replies
0
Boosts
0
Views
401
Activity
Apr ’22