Post

Replies

Boosts

Views

Activity

Bounce a virtual object off real world wall?
Hi! While waiting for scene understanding to work in the visionOS simulator, I am trying to bounce a virtual object off a real world wall or other real world object on iOS ;). I load my virtual objects from a Reality Composer file where I set them to participate in physics with dynamic motion type. With this I am able to have them collide with each other nicely, occlusion also works, but they go right through walls and other real world objects rather than bouncing off... I've tried a couple of variations of the following code: func makeUIView(context: Context) -> ARGameView { arView.environment.sceneUnderstanding.options.insert(.occlusion) arView.environment.sceneUnderstanding.options.insert(.physics) arView.debugOptions.insert(.showSceneUnderstanding) arView.automaticallyConfigureSession = false let config = ARWorldTrackingConfiguration() config.planeDetection = [.horizontal, .vertical] config.sceneReconstruction = .meshWithClassification arView.session.run(config) if let myScene = try? Experience.loadMyScene() { ... arView.scene.anchors.append(myScene) } return arView } I have found several references that his should "just work", e.g. in https://developer.apple.com/videos/play/tech-talks/609 What am I missing? Testing on iPhone 13 Pro Max with iOS 16.5.1 🤔
1
0
1.1k
Aug ’23
'MultipeerConnectivityService' is unavailable in visionOS?
Hi! despite the documentation saying otherwise, MultipeerConnectivityService appears to be unavailable in visionOS. Am I missing something or is this an issue with the current beta or (hopefully not 😬) the documentation? https://developer.apple.com/documentation/realitykit/multipeerconnectivityservice do { entity.scene?.synchronizationService = try MultipeerConnectivityService(session: MultipeerSession.shared.session) print("RealityKit synchronization started.") } catch { fatalError("RealityKit synchronization could not be started. Error: \(error.localizedDescription)") } Xcode complains 'MultipeerConnectivityService' is unavailable in visionOS, while the scene's synchronizationService property can be accessed...
4
1
1.7k
Aug ’23
WeatherKit Swift / REST mismatch? daytimeForecast and overnightForecast not available via Swift?
I am able to obtain daily forecasts via the REST API which include the daytimeForecast and overnightForecast records with their respective properties like cloudCover. So far I have failed to access them via the Swift API: forecast.daytimeForecast.cloudCover results in: "Value of type 'DayWeather' has no member 'daytimeForecast'". But if I print() the DayWeather objects, these members are actually printed with all their properties. Is there a way to get them I am overlooking?
2
0
1.9k
Jul ’23