This is my code now:
let entity = try! Entity.load(named: "Hand") //This returns a Entity
//let entity = try! Entity.loadModel(named: "Hand") //This returns a ModelEntity
entity.generateCollisionShapes(recursive: true)
// Anchoring the entity and adding it to the scene
let anchor = AnchorEntity(plane: .horizontal)
anchor.addChild(entity)
self.arView.scene.addAnchor(anchor)
// installing gestures for the Entity
self.arView.installGestures(for: entity) //This only works on ModelEntity apparently
}
Is it possible to somehow installGestures on the Entity object and not only the ModelEntity? Because if I try to installGestures on Entity I get an error: "Entity does not conform to type HasCollision"