Node becomes invisible when moving the camera

Hi, I'm making an app to render glb models with scenekit (using this library https://github.com/warrenm/GLTFKit2).

Everything works great, but some nodes become invisible when moving the camera (this usually happens after performing a SCNAnimation).

I know that in BabylonJS there is a an option to make a node always active (and shortcut the frustum clipping phase). See this post: https://forum.babylonjs.com/t/models-become-non-visible-when-moving-around/20949.

I would like to know if there is a similar option in Scenekit or any solution to my problem.

Here is a video of the problem: https://drive.google.com/file/d/1eUsiUk5dEcV72GhB-nHk9rKTF6dQttei/view?usp=sharing

Thanks!

Replies

check your clipping planes? https://developer.apple.com/documentation/scenekit/scncamera/1436592-znear

  • I don't think it has to do with clipping planes. I have zNear set at the default value and zFar set at a value that is high enough to display the node. I also tried to change the values but the problem persists. I think it has more to do with the geometry not being updated after the SCNAnimation, so the camera thinks that the node is outside the field of view.

Add a Comment