Post

Replies

Boosts

Views

Activity

Reply to Template Project Entity Overlapping and Sticking Issues
6th issue: after interacting with either spheres, and then pressing on the "hide immersive space" button, we can no longer re-open the scene. This is because we dont receive the callback/result after running the await dismissImmersiveSpace() command as the following loggers do not output! event .onDisappear of the ImmersiveView() case .inTransition of the appModel.immersiveSpaceState in the ToggleImmersiveSpaceButton view. _This issue only occurs if we manipulate one of the spheres, otherwise the open and hide button works as expected. _
Topic: Spatial Computing SubTopic: General Tags:
Sep ’25
Reply to ImagePresentationComponent .spatialStereoImmersive mode not rendering in WindowGroup context
Been working a lot with these new APIs lately, and with several types of media to boot! We are achieving stereoscopic effects with all our media. But, these APIs are not a 1 size fits all... Here is some advice: you have to test each of your media test which ones need to be converted to Spatial3DImage some HEICs don't need to have a Spatial3DImage generated since they are already stereoscopic for each type media, test what is the best viewing mode in Windows, and what is the best viewing mode in ImmersiveSpaces keep track of your findings, it differs by media type!
Topic: Spatial Computing SubTopic: General Tags:
Aug ’25
Reply to What is the first reliable position of the apple vision pro device?
By the way, thank you for your recommendations to use AnchorEntity(.head). We have tried using it before but kept getting inconsistencies wrt entity placements and re-adjustments, We are still trying to figure out how best to use it. Adding all our content has AnchorEntity(.head)'s children is requiring lots of refactoring, since we have several entities controlled by Timeline animations, and as mentioned, we are not getting correct head positioning. Currently, our favorite best working solution for eye-level placement is the DeviceTracker shared above.
Topic: Spatial Computing SubTopic: ARKit Tags:
May ’25
Reply to What is the first reliable position of the apple vision pro device?
Hi Vision Pro Engineer, Thanks for your reply, and apologies for my late reply. We tried points 1, 2, and 3 of your recommendations and have since moved our logic into the following DeviceTracker class. Using your recommendations, we appear to be able to remove the frame counter properties. But, the following arbitrary yValue > 0.3 condition needs to remain. Otherwise, we are still getting negative values, see image. import ARKit import Combine import OSLog import RealityKit import SwiftUI @Observable public final class DeviceTracker { private let session = ARKitSession() private let worldInfo = WorldTrackingProvider() private var sceneUpdateSubscription: EventSubscription? private let logger = Logger(subsystem: SUBSYSTEM, category: "DeviceTransformTracker") public var deviceTransform: simd_float4x4? = nil public init() { // Defer the task until self is fully initialized Task.detached(priority: .userInitiated) { [session, worldInfo, logger] in do { try await session.run([worldInfo]) } catch { logger.error("\(#function) \(#line) Failed to start ARKitSession: \(error.localizedDescription)") } } } public func subscribe(content: RealityViewContent) { sceneUpdateSubscription = content.subscribe(to: SceneEvents.Update.self) { [weak self] _ in guard let self = self else { return } guard self.worldInfo.state == .running else { logger.warning("\(#function) \(#line) worldInfo.state not running") return } guard let deviceAnchor = self.worldInfo.queryDeviceAnchor(atTimestamp: CACurrentMediaTime()) else { logger.warning("\(#function) \(#line) missing deviceAnchor for CACurrentMediaTime() \(String(describing: CACurrentMediaTime()))") return } guard deviceAnchor.isTracked else { logger.warning("\(#function) \(#line) deviceAnchor not yet tracked") return } let yValue = deviceAnchor.originFromAnchorTransform.columns.3.y logger.warning("\(#function) \(#line) y value = \(deviceAnchor.originFromAnchorTransform.columns.3.y)") if yValue > 0.3 { self.deviceTransform = deviceAnchor.originFromAnchorTransform } } } public func cancel() { sceneUpdateSubscription?.cancel() } }
Topic: Spatial Computing SubTopic: ARKit Tags:
May ’25
Reply to visionOS Simulator Rotate and Scale gestures difficult to register (capture)
This no longer works in visionOS 26 simulator. Anyone have tips on how to easily perform a rotation on the simulator?
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to Template Project Entity Overlapping and Sticking Issues
Issue #6 can be resolved by using our own custom state property to help determine whether the immersive space is active or not, see the workaround described in the image. FB20448085 submitted for the unreliable dismissImmersiveSpace callbacks.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Template Project Entity Overlapping and Sticking Issues
Issue number 6 is still pending..
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Template Project Entity Overlapping and Sticking Issues
Issues 4 and 5 have been resolved by performing a reset all settings on the physical device.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Template Project Entity Overlapping and Sticking Issues
Issues 1, 2, and 3 have been resolved with the following code changes ImmersiveView
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Template Project Entity Overlapping and Sticking Issues
6th issue: after interacting with either spheres, and then pressing on the "hide immersive space" button, we can no longer re-open the scene. This is because we dont receive the callback/result after running the await dismissImmersiveSpace() command as the following loggers do not output! event .onDisappear of the ImmersiveView() case .inTransition of the appModel.immersiveSpaceState in the ToggleImmersiveSpaceButton view. _This issue only occurs if we manipulate one of the spheres, otherwise the open and hide button works as expected. _
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Template Project Entity Overlapping and Sticking Issues
FB20298276 with repo and videos for simulator and hardware.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Template Project Entity Overlapping and Sticking Issues
And a 5th issue on the real device, visible when you run in debug mode with the Debug Vizualization turned ON, with the options Axes, Bounds, and Collision Shapes and Axes selected: the rotation axis of the spheres are off point (ie: the rotation point appears to not be the center of the entity, but rather on 1 of it's corners).
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Template Project Entity Overlapping and Sticking Issues
There is actually a 4th issue with this example project: When we run this on the real Apple Vision Pro hardware, we get very sluggish and slow dragging behavior, either on first run or subsequent runs.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to ImagePresentationComponent .spatialStereoImmersive mode not rendering in WindowGroup context
Been working a lot with these new APIs lately, and with several types of media to boot! We are achieving stereoscopic effects with all our media. But, these APIs are not a 1 size fits all... Here is some advice: you have to test each of your media test which ones need to be converted to Spatial3DImage some HEICs don't need to have a Spatial3DImage generated since they are already stereoscopic for each type media, test what is the best viewing mode in Windows, and what is the best viewing mode in ImmersiveSpaces keep track of your findings, it differs by media type!
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to What is the first reliable position of the apple vision pro device?
By the way, thank you for your recommendations to use AnchorEntity(.head). We have tried using it before but kept getting inconsistencies wrt entity placements and re-adjustments, We are still trying to figure out how best to use it. Adding all our content has AnchorEntity(.head)'s children is requiring lots of refactoring, since we have several entities controlled by Timeline animations, and as mentioned, we are not getting correct head positioning. Currently, our favorite best working solution for eye-level placement is the DeviceTracker shared above.
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to What is the first reliable position of the apple vision pro device?
Hi Vision Pro Engineer, Thanks for your reply, and apologies for my late reply. We tried points 1, 2, and 3 of your recommendations and have since moved our logic into the following DeviceTracker class. Using your recommendations, we appear to be able to remove the frame counter properties. But, the following arbitrary yValue > 0.3 condition needs to remain. Otherwise, we are still getting negative values, see image. import ARKit import Combine import OSLog import RealityKit import SwiftUI @Observable public final class DeviceTracker { private let session = ARKitSession() private let worldInfo = WorldTrackingProvider() private var sceneUpdateSubscription: EventSubscription? private let logger = Logger(subsystem: SUBSYSTEM, category: "DeviceTransformTracker") public var deviceTransform: simd_float4x4? = nil public init() { // Defer the task until self is fully initialized Task.detached(priority: .userInitiated) { [session, worldInfo, logger] in do { try await session.run([worldInfo]) } catch { logger.error("\(#function) \(#line) Failed to start ARKitSession: \(error.localizedDescription)") } } } public func subscribe(content: RealityViewContent) { sceneUpdateSubscription = content.subscribe(to: SceneEvents.Update.self) { [weak self] _ in guard let self = self else { return } guard self.worldInfo.state == .running else { logger.warning("\(#function) \(#line) worldInfo.state not running") return } guard let deviceAnchor = self.worldInfo.queryDeviceAnchor(atTimestamp: CACurrentMediaTime()) else { logger.warning("\(#function) \(#line) missing deviceAnchor for CACurrentMediaTime() \(String(describing: CACurrentMediaTime()))") return } guard deviceAnchor.isTracked else { logger.warning("\(#function) \(#line) deviceAnchor not yet tracked") return } let yValue = deviceAnchor.originFromAnchorTransform.columns.3.y logger.warning("\(#function) \(#line) y value = \(deviceAnchor.originFromAnchorTransform.columns.3.y)") if yValue > 0.3 { self.deviceTransform = deviceAnchor.originFromAnchorTransform } } } public func cancel() { sceneUpdateSubscription?.cancel() } }
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to [xrsimulator] Exception thrown during compile: cannotGetRkassetsContents
FB16454982
Replies
Boosts
Views
Activity
Feb ’25
Reply to Attachment always user facing
You can also see a more coded custom approach to this feature in Apple's Diorama sample code.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Attachment always user facing
See Billboard component in RealityComposer Pro. I set it's property to 1 and now the attachments rotate to face the user.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’24