I want to change the opacity of a 3D object with animation. Since RealityKit is highly integrated with SwiftUI on visionOS, I tried this method:
let model = ModelEntity()withAnimation(.easeInOut) { model.components[OpacityComponent.self] = .init(opacity: 0.25)}
However, it didn't work.