苹果文档_
func projectPoint(_ point: simd_float3, orientation: UIInterfaceOrientation, viewportSize: CGSize) -> CGPoint
说:
视口尺寸
将在其中显示相机图像的视图的大小(以磅为单位)。
我不清楚要呈现相机图像的视图是什么意思?这是否意味着我应该为viewportSize输入屏幕尺寸?
let screenDimensions = UIScreen.main.bounds.size
let position = node.position
camera.projectPoint(simd_float3(position), orientation: .portrait, viewportSize: screenDimensions)