swiftscnscene

How to disable double-tap in defaultCameraController?


In SCNScene, allowsCameraControl lets you move and rotate the camera, but when I "double-tap", the camera spins quickly and the object disappears.

I am reading the documentation, but I'm not sure how to disable double-tap.


Solution

  • SCNView is a subclass of UIView which has a property gestureRecognizers, an array of UIGestureRecognizers. You can loop through this array looking for the "double-tap" gesture. Once found, you can disable the gesture by setting isEnabled = false.