The Apple doc for
func projectPoint(_ point: simd_float3, orientation: UIInterfaceOrientation, viewportSize: CGSize) -> CGPoint
says:
viewportSize
The size, in points, of the view in which the camera image is to be presented.
I'm not clear what the view in which the camera image is to be presented means? Does that mean that I should put in the screen dimensions for the viewportSize?
let screenDimensions = UIScreen.main.bounds.size
let position = node.position
camera.projectPoint(simd_float3(position), orientation: .portrait, viewportSize: screenDimensions)
I just noticed the link also said:
This suggests that you can put whatever size you want. The screen dimensions would be suffice if necessary.