So I am trying to understand how allowsCameraControl really work.
I have a scene and I set the allowsCameraControl = true. When I pan around and the scene rotates, or translates (two fingers...), I don't understand what scene kit really changes for me.
I was expecting the camera node to change position, or rotation. Not the case. I also logged the position and rotation of the rootNode of the scene...no change.
So just to be clear, in the render delegate called for every frame update, I log the position and rotation of the camera node I set for the scene, I logged the position and rotation of the root node, I also logged te position and rotation of a node I added to the scene. None of these show any change in position and or rotation.
Can anyone explain to me what scene kit changes when the scene rotates or translates using the standard camera controls?
A new camera is indeed created, leaving the original one unchanged. The scene graph is also unchanged. The new camera is not part of the scene graph and can be accessed with scnView.pointOfView
A new camera is created, leaving the original one unchanged.
If you show the inspector using the showsStatistics
property, you'll notice the Point of View changes from the camera you had (even if it is "Untitled") to kSCNFreeViewCameraName
.
Sadly there is not much documentation about this behavior but you might be able to find it in the node hierarchy.
Let us know what you find!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With