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