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)!")
})
New component name:
TapActionComponent
Usage:
See: #18