Post

Replies

Boosts

Views

Activity

How to set defaultCameraController?
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)         }     } }
0
0
438
Jan ’22
How to set defaultCameraController?
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)         }     } }
Replies
0
Boosts
0
Views
438
Activity
Jan ’22