swiftswiftuiaugmented-realityrealitykitreality-composer

How to installGestures on Reality Composer


is there a way to add installGestures in reality composer?

i am able to do it in code, but i don`t want to mix too much code and ui parts. so i am searching how i can do the drag and drop part in reality composer.

here is the code snipit to do it in code and what i did so far.

arView.installGestures([.translation], for: modelEntity)

does anyone know how to enable this in reality composer?

thanks


Solution

  • Reality Composer 1.5 allows you implicitly implement gestures only for animated behaviors. At the moment there's no explicit way to turn on Translation, Rotation or Pinch gestures in Reality Composer. Only via RealityKit, as you indicated.

    arView.installGestures([.all], for: entity)
    

    P. S.

    Also, this post will show you how raycasting works in conjunction with RealityKit gestures.