Lab 091 – Light the Beacon
Just a bit of fun while I wait for my Apple Vision Pro M5 to arrive.
Most of the work for this lab is in a Reality Composer Pro scene. I have a cone with a transparent material and a spotlight that uses a radius similar to the cone. I added an anchor transform to the end. Then I used a Timeline to spin the cone in one direction and the anchor transform in the other.

In the RealityView, we simply load this scene and get the anchor. Then we just add an attachment to this anchor and give it some content.
struct Lab091: View {
var body: some View {
RealityView { content in
guard let scene = try? await Entity(named: "SaveUs", in: realityKitContentBundle) else { return }
content.add(scene)
guard let anchorPoint = scene.findEntity(named: "Anchor") else { return }
let attachment = ViewAttachmentComponent(rootView: beaconFace)
anchorPoint.components.set(attachment)
}
}
var beaconFace: some View {
VStack {
Image(systemName: "vision.pro")
.font(.extraLargeTitle2)
}
}
}Video Demo
Support our work so we can continue to bring you new examples and articles.
Download the Xcode project with this and many more labs from Step Into Vision.

Follow Step Into Vision