Home > Blockchain >  How to disable Camera Framing that enframes all the content in the scene?
How to disable Camera Framing that enframes all the content in the scene?

Time:04-06

I try to build the scene where I have 2 nodes. They have different size: one is 10 times bigger than the other. The problem is that the camera tries to cover (zoom out) all the objects on the scene, so a user can see a full picture on the screen.

I know there is an option to disable this feature, so the camera will remain in the same position where it was before without trying to zoom out in order to cover all the objects on the screen.

CodePudding user response:

It's easy to achieve:

sceneView.pointOfView?.position.z = 2.0

CodePudding user response:

Actually, in my case the problem was that after I created SCNScene and substitute the scene that has already been set, scnView.pointOfView became nil, the solution in my case was to save pointOfView before setting a new SCNScene object and then set it back.

  • Related