A Swift Package for creating familiar UI Elements and animations in RealityKit. For both Augmented Reality or Virtual Reality scenes. Now with visionOS support.
let entity: Entity = ...
entity.components.set(TapActionComponent { tappedEntity, worldPosition in
print("Entity \(tappedEntity) was tapped at \(worldPosition ?? .zero)!")
})
Refer to Issue #19
Example usage: