How to install gestures for Reality Composer

Hello 👋

I added USDZ with animation in the Reality Composer (.rcproject) After Load the scene and added to the ARView

I tried to install gestures like Rotate scale ... but won't work

let ganGes = gangnim?.gnagnumObject as? Entity & HasCollision

        arView.installGestures([.rotation,.translation,.scale], for: ganGes!)


How can I install Gestures to Reality Composer

The installGestures only work on Entities that have collision shapes, and the interaction needs to "hit" the collision shapes of the model.

You can enable the showPhysics debug option to see a visual representation of the entity's collision shapes (drawn as purple wireframes). If you don't see the shapes, odds are there is either no collision shape, or the collision shape is very, very large and not able to be interacted with.

To add collision shapes, you can either check the "Physics" box in Reality Composer and then select a Collision Shape, or you can call generateCollisionShapes(recursive:) on the appropriate ModelEntity. You can also manually set the collision component with a specific collection of ShapeResources if you find that the generated collision shapes are not working for your model.

How to install gestures for Reality Composer
 
 
Q