HelloWorld example: How to make the globe in immersive space interactable?

In the HelloWorld sample, there is an immersive view with a globe in it. It spins, but the user cannot spin it themselves.

I have looked at the volumetric window, where the globe can be interacted with, but if I understand it correctly, this works because the whole RealityView is being rotated if the user performs a drag gesture.

How could the same be accomplished for an entity inside a RealityView, in this case the globe inside the immersive view? If I just apply the dragRotation modifier, it will rotate the entire RealityView, which yields a strange result, as the globe is not centered on the world origin here, so it spins around the users head.

Is there a way to either translate the entire RealityView and then spin it, or just spin an entity inside it (the globe) on user interaction?

In Unity, I would just use another gameobject as a parent to the globe, translate it, and let the user spin it.

To interact with an entity you need to

generate collision shapes:

 let model = try await ModelEntity(named: modelName)
  model.generateCollisionShapes(recursive: true)
  model.components.set([InputTargetComponent()])

add a rotate gesture to your reality view

.gesture(RotateGesture().targetedToAnyEntity().onChanged({ value in
    //access the entity targeted with value.entity and the angle with value.rotation.radians
        }))

On a simulator press the option key and rotate.

HelloWorld example: How to make the globe in immersive space interactable?
 
 
Q