How to disabled some default functionality in Scene view when allowsCameraControl = true?

拜拜、爱过 提交于 2019-12-23 04:33:48

问题


Please Help me, I have setup "allowsCameraControl = true" in Scene view. How to disabled some default functionality. 
Ex : Pan with two fingers to translate the camera on its local xy-plane

 scnview.allowsCameraControl = true
 scnview.defaultCameraController.interactionMode = .orbitTurntable
 scnview.defaultCameraController.inertiaEnabled = true
 scnview.defaultCameraController.maximumVerticalAngle = 69
 scnview.defaultCameraController.minimumVerticalAngle = -69
 scnview.autoenablesDefaultLighting = true

回答1:


Look at SCNCameraControlConfiguration (https://developer.apple.com/documentation/scenekit/scncameracontrolconfiguration)

It has some variables for controlling the default camera behavior. It particular there is a "allowsTranslation" variable that controls two finger panning.

That said, I've had mixed results using this to control the behavior.



来源:https://stackoverflow.com/questions/57476065/how-to-disabled-some-default-functionality-in-scene-view-when-allowscameracontro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!