Instance Property

fieldOfView

The vertical or horizontal viewing angle of the camera.

Declaration

@property(nonatomic) CGFloat fieldOfView;

Discussion

The projectionDirection property determines whether this fieldOfView property measures the camera's vertical or horizontal viewing angle, and SceneKit automatically calculates the viewing angle in the other direction to match the aspect ratio of the view displaying the scene. For example, a fieldOfView of 60 and the default SCNCameraProjectionDirectionVertical projection, presented fullscreen on a 16:9 display in portrait orientation, results in a vertical viewing angle of 60° and a horizontal viewing angle of 33.75°.

You can choose to specify viewing angle either directly, using this fieldOfView property, or in terms that model a physical camera, using the sensorHeight and focalLength properties. Setting the fieldOfView property causes SceneKit to automatically recalculate the focalLength value, and setting the sensorHeight or focalLength property recalculates fieldOfView.

See Also

Managing Field of View

focalLength

The camera's focal length, in millimeters.

sensorHeight

The vertical size of the camera's imaging plane, in millimeters.

projectionDirection

The axis used to determine field of view or orthographic scale.

SCNCameraProjectionDirection

Options for the axis used to determine field of view or orthographic projection.