当allowCameraControl = true时,如何在“场景"视图中禁用某些默认功能? [英] How to disabled some default functionality in Scene view when allowsCameraControl = true?

查看:431
本文介绍了当allowCameraControl = true时,如何在“场景"视图中禁用某些默认功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我,我在场景"视图中设置了"allowsCameraControl = true".如何禁用一些默认功能. Ex :用两根手指平移以在其本地xy平面上平移相机

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

推荐答案

查看SCNCameraControlConfiguration( https ://developer.apple.com/documentation/scenekit/scncameracontrolconfiguration )

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

它具有一些用于控制默认相机行为的变量.特别是有一个"allowsTranslation"变量来控制两个手指的平移.

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.

这篇关于当allowCameraControl = true时,如何在“场景"视图中禁用某些默认功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆