The Vision Room project is built for placing objects and interacting with them in your apartment using an Apple Vision Pro device.
How to Build a visionOS App: Perpetio’s Experience
- Furniture Library
- Furniture Selection/Placement/Rotation
- Show and manipulate multiple objects at the same time
- Swift 5.9
- SwiftUI
- VisionOS SDK
- RealityKit SDK
- Mac computer with macOS Ventura or later
- Apple Vision Pro (or Vision Pro simulator)
- Xcode 15 or later
Library
The Library screen shows a list of categories (types of furniture) on the left side and related to the selected category of furniture on the right. All your selections are stored in the Recently Viewed category.
By selecting a specific item in the Library, the app starts loading USDZ model content to the memory to allow the user to manipulate it in the virtual space.
Object Placement and Rotation
To move the object inside your room you need to tap and hold a specific object in the Library and walk in the direction where you want to place it. When you are ready, please take your finger off and the object will be placed at these coordinates.
By using the pinch operation, you can rotate the object as you wish like in the animated image below.
Visible Furniture
The app also allows you to place multiple objects in your room at the same time.
From this screen, you can change the position of the already visible objects, rotate them, and delete them from the virtual space if needed.
- Download the repository
- Open FurniturePlacementApp.xcodeproj file
- Wait until all project dependencies are installed
- Run the app on the simulator or real device
- Enjoy it!
MIT