how do i add a portal in visionOS?
Asked on 08/02/2024
1 search
To add a portal in visionOS, you can use the RealityKit APIs. Here are the steps to get started:
-
Set Up the Portal Component: You need to set up the portal component and define the crossing mode. You can set the mode to a plane to enable crossing or set it to disabled to disable crossing. Ensure that the plane coincides with the portal geometry itself.
-
Enable Portal Crossing: This feature allows objects to smoothly cross the portal surface. For example, in a game, you can have spaceships or other objects move in and out of the portal seamlessly.
-
Lighting Configuration: When an object is inside the portal, it can be lit by a custom image-based light component. When it is outside, it receives additional lighting from an environment probe. You can use an environment lighting configuration component to control the lighting transition smoothly.
For a detailed implementation, you can refer to the session Discover RealityKit APIs for iOS, macOS and visionOS starting at 20:17.
Relevant Sessions
These sessions provide comprehensive guidance on designing and implementing portals in visionOS.

Design interactive experiences for visionOS
Learn how you can design a compelling interactive narrative experience for Apple Vision Pro from the designers of Encounter Dinosaurs. Discover how these types of experiences differ from existing apps, media, and games, and explore how to design narratives that bring audiences into new worlds. Find out how you can create stories that adapt to any space and size, provide multiple levels of interaction to make them accessible to all, and use animation, spatial audio, and custom gestures to further immerse people in your experience.

Platforms State of the Union
Discover the newest advancements on Apple platforms.

Design great visionOS apps
Find out how to create compelling spatial computing apps by embracing immersion, designing for eyes and hands, and taking advantage of depth, scale, and space. We’ll share several examples of great visionOS apps and explore how their designers approached creating new experiences for the platform.