0

I'm trying to create a camera that the user can control using different gestures. I could use allowCameraControl, but i want to have a bit different controls than that. For example, If there is two fingers that go from the bottom of the screen to up slowly, the camera would rotate slowly around itself from watching down to watching up. How would i do this?

Asphys
  • 175
  • 3
  • 15

1 Answers1

0
  1. set allowCameraControl to false
  2. create cameraNode and add to rootNode
  3. add UIPanGestureRecognizer
  4. in you gesture handler, apply transformation to cameraNode // there is a velocity parameter in the handler that you can use // to apply changes to cameraNode

let me know if you need more information

medics
  • 5
  • 3