The camera node in the scene that determines what part of the scene’s coordinate space is visible in the view.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The default value of this property is
nil, which means that the scene’s
size properties determine what portion of the scene is visible. If set to point to a camera node contained in the scene, the
anchor property is ignored and the scene is rendered using the camera node’s properties instead.
A camera must be added as a child of the scene for it to render that scene.
Listing 1 shows how to add a camera to an
scene. The camera is positioned in the center of the scene which gives the same result as rendering a camera-less scene with an
For more information, see