Post

Replies

Boosts

Views

Activity

Reply to How to display a RealityKit Perspective Camera View in a visionOS SwiftUI 2D window?
Hi Greg, thanks for your quick replay, and the interesting hint to PortalComponent that I was not aware of. Unfortunately, this does not solve my problem. Sorry that I did not explain it better. Let me try again: I am developing a visionOS app that is kind of a game. It uses an immersive space in which a board is shown with entities on it. These entities are primitive beings that move on the board according to simple rules. The user sees this boards with the beings in the immersive space. This board is shown using a RealityView with attachments. An attachment is shown after the user selects one of the beings by a SpatialTapGesture. The attachment shows then infos for the selected being in a 2D window. What I want to show in this 2D window is how the board with the beings looks from the perspective of the selected being. Therefore, this being has to have a camera attached to it. In RealityKit, I can create an Entity of type PerspectiveCamera, and attach it to the being as child. PerspectiveCamera is available in VisionOS 1.0+. However, I did not find a way to access the video stream or the image of this camera, and to display it in the 2D window of the attachment. In iOS this could be realized by using an ARView with non AR camera mode. However, ARView is not available in visionOS. So, how could I access the video stream or the image of the PerspectiveCamera in visionOS?
Aug ’24