I have this code, and want to set the defaultCameraController.maximumVerticalAngle = 0.001 to disable up/down rotation of camera. How can this property be set in SwiftUI?
import SwiftUI
import SceneKit
struct ContentView: View {
var scene = SCNScene(named: "LowPolyCopNew.usdz")
var body: some View {
VStack{
SceneView(scene: scene, options: [.allowsCameraControl, .autoenablesDefaultLighting])
.frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height / 2)
Spacer(minLength: 0)
}
}
}