RotateGesture3D does not seem to work in simulator

I can't seem to get the rotation gesture to work. Here is my code:

struct ContentView: View {
    @State var rotation:Rotation3D = Rotation3D()
    
    var rotate:some Gesture {
        RotateGesture3D()
            .targetedToAnyEntity()
            .onChanged { gesture in
                rotation = gesture.rotation
            }
    }
   
    var body: some View {
        RealityView { content in
            let box = ModelEntity(mesh: .generateBox(size: 0.25))
            box.generateCollisionShapes(recursive: false)
            box.components.set(InputTargetComponent())
            content.add(box)
        }
        .gesture(rotate)
        .rotation3DEffect(rotation)
    }
}

I assume it is up to me to apply the rotation with rotation3DEffect but I have also tried it without. Is it just not supported in the simulator? Can I expect it to work on the device? If so, is the code correct?

Answered by davidecrooks in 777739022

Problem solved - I just didn't understand how to perform the gesture. It's a two handed gesture, so you need to hold down the option key in the simulator to get two points.

Accepted Answer

Problem solved - I just didn't understand how to perform the gesture. It's a two handed gesture, so you need to hold down the option key in the simulator to get two points.

Thank you, internet stranger!

RotateGesture3D does not seem to work in simulator
 
 
Q