Friday, June 13, 2025

Manipulation on visionOS

Of all the great things introduced at WWDC25 this year, ManipulationComponent and the manipulable() SwiftUI modifier are really great. These provide some rather natural interactions with objects with one line very little code.

I just published an open-source sample visionOS app, Manipulatives, which demonstrates the basics of this. My approach is to group everything I want to become manipulable as a child of one Entity with a specific name. Then I can search for that parent Entity, and loop thru all of its children adding ManipulationComponent. This would, of course, be even simpler if the ManipulationComponent were available directly form within Reality Composer Pro (Feel free to file a Feedback and reference my FB17979086).

With ManipulationComponent and Entity Observables, I see this as a great combination to tracking how users are moving entities around. I’m excited to put this into action and look at ways to turn user’s manipulations of Entities into dynamic behaviors and actions in my apps’ scenes.