Post

Replies

Boosts

Views

Activity

Reply to MapPolygon
Pretty sure hit testing with a MapReader proxy is the way to go: Something like: MapReader { proxy in Map(initialPosition: cameraPosition) { MapPolygon(polygon) .stroke(.purple.opacity(0.5), lineWidth: 5) .foregroundStyle(isSelected ? .purple.opacity(0.2) : .clear) } .onTapGesture { tapPoint in if let coordinate = proxy.convert(tapPoint, from: .local) { let renderer = MKPolygonRenderer(polygon: polygon) let mapPoint = MKMapPoint(coordinate) let rendererPoint = renderer.point(for: mapPoint) if renderer.path.contains(rendererPoint) { isSelected.toggle() } } } }
Feb ’25
Reply to Human pose detection failing on Vision Pro
The sample you referenced lists iOS 17.0+, iPadOS 17.0+, and Xcode 15.0+ as the requirements for success. And, while the Mac maybe able to access the API available to iPadOS, it looks like an iPad app in visionOS or even this project with a native visionOS target may not. I’d file a feedback that this is broken.
Topic: Spatial Computing SubTopic: ARKit Tags:
Mar ’25