February 10, 2023

RealityKit <3 PencilKit

I had this idea of creating a collaborative AR experience where friends could draw and create art together. I made a small prototype just to play with the format and how it would feel on an iOS device while learning to combine RealityKit and the pretty amazing PencilKit. At this point it mostly serves as a demo of how to integrate RealityKit and PencilKit in a nice way but who knows what will happen in the future. Read more

February 8, 2023

RoomPlan using SwiftUI

I spent almost a year working with VR/AR for a pretty big game company. They make some great games, mostly in Unity and for the Oculus Quest range of headsets. Some of the games needed to mark out the surrounding play area and obstacles manually in order to start playing. Really nice games but that startup process was quite tedious. When I saw the RoomPlan session at WWDC I had this idea to get rid of the manual setup and instead use one of the players iPhones, map out the surrounding area with RoomPlan, sync it with the headset and then anchor it in the game. Read more

February 7, 2023

Controlling AR-entities with an iPhone

I once worked on adding support for hands tracking for an existing VR game on the Oculus Quest2. Moving from controllers to just using your hands made me think about interaction design in VR/AR in a new way. The dream scenario would be to just do the same thing as with controllers, but with hands. That would be fast, cheap and fancy, right? Turns out it worked but wasn’t very fun, and didn’t spark joy. Read more

January 17, 2023

Adding Bezier animations to RealityKit

I love animation systems. I wrote animation systems for the C64 and Amiga in the 80’s and 90’s, for fashion designer apps at H&M, for games like Candy Crush and god knows how many more. RealityKit has a nice and user friendly animation system that can handle different linear world space transforms, play model space animations from usdz models and combine them in sequences or groups. RealityKit entities can play an AnimationResource with the playAnimation method and AnimationResources are created from AnimationDefinitions. Read more

January 13, 2023

Using the RealityKit AnchorEntity

We spent last post learning how ARKit anchors work and how they relate to RealityKit entities. In the end we wrote our own RealityKit AnchorEntity based on the results of the ARSessions provided ARAnchors. This is all fine but if we just need a quick anchor we can use the RealityKit provided AnchorEntity. We start the same way by setting up an ARSession. Requesting horizontal plane detection. private func setupARSession() { let session = self. Read more