Post

Replies

Boosts

Views

Activity

Set anchor point for SwiftUI attachment
We want to overlay a SwiftUI attachment on a RealityView, like it is done in the Diorama sample. By default, the attachments seem to be placed centered at their position. However, for our use-case we need to set a different anchor point, so the attachment is always aligned to one of the corners of the attachment view, e.g. the lower left should be aligned with the attachment's position. Is this possible?
0
1
601
May ’24
Tab view display bug on visionOS
I noticed a weird tab view display bug on visionOS if the tab labels are changed at runtime, e.g. to switch from one locale to another. If the longest label on the tabs is smaller than the previous longest tab label, the tab ornament's width shrinks and thus the texts and icons can become barely visible, even if the tab labels are not being displayed. If the longest tab label gets longer, however, additional padding is added. It seems as if the calculation for the tab width does not take dynamic changes into account. Is there a workaround for this behavior?
2
0
660
Apr ’24
How to create a immersive panorama like the environments?
I would like to create a immersive panorama like the environments where the user can look around 360°, yet interactive, i.e. the user should be able to interact with entities placed on that panorama. My current approach is to create a sphere around the user and invert the normals, so the texture is placed inwards, towards the user. This works, but open SwiftUI windows show pretty weird behaviors, as described here: https://developer.apple.com/forums/thread/749956 Windows don't show their handles anymore, and the glass effects do not recognize my sphere but show the world "outside" of it. This is not the case for Apple's environments. Is there a better way to create a fully immersive sphere around the user?
0
0
494
Apr ’24
How to rotate a SwiftUI view?
I just tried out the app "Blue Moon" (Solitaire Game) from the App Store. They managed to add a secondary SwiftUI tutorial view that resides to the left of the main window and is rotated towards the user. How can this be achieved? I tried to use ornaments, but couldn't find a tilting / rotating option.
0
0
553
Apr ’24
How to visualize collision components in RealityKit Composer Pro?
I setup an entity with a collision component on it. But it was hard to target the object for I tap gesture, until I increased the radius quite a bit. Now I am unsure if it is too large. Is there a way to visualize these components somehow, maybe even in a running scene? Also, I find it pretty confusing that the size is given in cm. This made me wonder if this cm setting is affected by the entity's size at all? In Unity, it's just (local) "units".
1
0
1.2k
Apr ’24
What is the best way to lighten up a scene via ambient lighting?
Per default, RealityKit scenes are way too dark. The only solution I could find for this problem so far was to add an image based light to it. But it looks pretty weird, if I use a central IBL. The shadows are way too strong, and if I increase the intensity, the highlights get way too light. If I attach a light to each object, it kinda works, but feels strange to do so. I could not find any option to just setup an ambient light. Isn't there a way to do this, or am I just too dumb?
0
0
415
Apr ’24
App Store Connect: Publish visionOS-specific app for the same app store entry?
We have an existing AR app built for Android and iOS, using Unity. We now want to add a visionOS version of this app. However, this version is built natively, using Xcode directly, no Unity involved. I saw that I can add a new platform to my app in App Store Connect. But can I upload two different builds, and how will App Store Connect tell which uploaded bundle belongs to which platform?
1
0
525
Mar ’24
Can the Vision Pro scan QR codes?
We want to use QR code to open and activate certain features in our app. We don't want these QR codes to be hard-coded in our app (i.e. image tracking). Instead we want to use them like you typically would do with your smart phone camera: Just detect them if the user looks at them. And if they encode a certain URL pointing to our app, start the app via an URL handler and hand over the link, like it is possible on iOS. I tried this in normal Shared Space and also with the camera app. But neither recognized a QR code. Is this feasible with the Vision Pro?
0
1
1.2k
Mar ’24
How to retrieve location of the user on visionOS
Our app needs the location of the current user. I was able to grant access and the authorization status is 4 (= when in use). Despite of that, retrieving the location fails at almost all times. It returns the error: The operation couldn’t be completed. (kCLErrorDomain error 1.) It happens in both the simulator and on the real device. On the simulator, I can sometimes trick the location to be detected by forcing a debug location in Xcode. But this does not work on the real device. What might be the root cause of this behavior?
0
0
519
Mar ’24
Example project for Image Tracking on visionOS?
I am trying to get image tracking working on visionOS, but the documentation is pretty poor. It does not show how the SwiftUI setup should look like, and also how the reference images can be provided. For the latter question: I tried to just add a folder to my Assets and use this as the reference image group, but ImageTracker did not find it.
0
0
340
Mar ’24
Is it possible to tell Vision Pro to use just one eye for eye tracking?
I have an eye condition where my left eye is not really looking straight forward. I guess this is what makes my Vision Pro think that I am looking in a different direction (if I try typing on the keyboards, I often miss a key). So I am wondering if there is a way to set it up to use only one eye as a reference? I am using only one eye anyway, because I do not have stereo vision either.
0
0
333
Mar ’24