Post

Replies

Boosts

Views

Activity

Reply to RealityKit crashes when rendering SpriteKit scene with SKShapeNode in postProcess callback
This reminds of an error I got while setting up SKRenderer for this project: SKRenderer Demo. See code and comment in SKOfflineRenderer.swift: // If I dont use a depth/stencil texture, rendering crashes on simulator, device, and Mac // Without it, rendering only works on Xcode Live Preview let depthStencilDesc = MTLTextureDescriptor() depthStencilDesc.pixelFormat = .depth32Float_stencil8 depthStencilDesc.width = pixelWidth depthStencilDesc.height = pixelHeight depthStencilDesc.usage = .renderTarget depthStencilDesc.storageMode = .private The code is inside the init, check how the depthStencilTexture is setup for SKRenderer, it may help you.
Topic: Graphics & Games SubTopic: RealityKit Tags:
1w
Reply to RealityKit .Kinematic + collisions (visionOs)
In order to control physical entities within a physics simulation, you can explore the topic of proportional-derivative (PD) controllers. The principle: User input provides a target position Each frame (use the willSimulate event), a control system applies forces or impulses to drive the body toward that target This answer provides a sample implementation with SpriteKit. The same principles apply to RealityKit.
Topic: Graphics & Games SubTopic: RealityKit Tags:
Feb ’26
Reply to ARView ignores multi-touch events
I have submitted feedback FB21685578, titled "ARView does not support multi-touch". Currently, in order to access UIResponder's touch callbacks and respond to simultaneous touches on ARView, I have to either: Overlay an UIView on top of ARView and forward the touch events from the overlay to the ARView Attach a gesture recognizer to ARView, use the touch callbacks inside it to track touches, and handle the recognizer’s states Both workarounds add unnecessary debt and complexity.
Topic: Graphics & Games SubTopic: RealityKit Tags:
Jan ’26
Reply to SpriteKit framerate drop on iOS 26.0
Apple sent this response on 18 November 2025: We believe this issue has been addressed. Please verify this matter is resolved after updating to iOS 26.2 beta 3. iOS 26.2 beta 3 (Build: 23C5044b) Posted Date: November 17, 2025 In my testing, the issue seems resolved indeed! Thank you! It is great and encouraging news for SpriteKit users. The issue FB20808104, where both SpriteKit and RealityKit drop frames under SwiftUI views, still holds. I will continue to look for updates on the Feedback Assistant.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Dec ’25
Reply to SpriteKit framerate drop on iOS 26.0
I installed iOS 26.1 Beta 4, hoping the SpriteKit issues were fixed. But alas, they're still there. You can try this additional test: on any SpriteKit scene with a running animation, place a SwiftUI Menu on top. Each time the menu is opened, SpriteKit drops frames. This makes SwiftUI unusable alongside SpriteKit when the scene is animated or live-recorded. SpriteKit used to run predictably and efficiently. iOS 26 has broken too much in terms of performance and usability. The current state of things isn’t reassuring at all.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Oct ’25
Reply to SF Symbols work with SpriteKit on iOS?
I also use SF Symbols with SpriteKit for quick UI and icon prototyping. I have an SKTexture extension to create SpriteKit textures from SF Symbol on iOS: extension SKTexture { convenience init?(systemName: String, pointSize: CGFloat, weight: UIImage.SymbolWeight = .regular) { let config = UIImage.SymbolConfiguration(pointSize: pointSize, weight: weight) guard let symbol = UIImage(systemName: systemName)?.applyingSymbolConfiguration(config) else { return nil } let rect = CGRect(origin: .zero, size: symbol.size) UIGraphicsBeginImageContextWithOptions(rect.size, false, 0) guard let context = UIGraphicsGetCurrentContext() else { return nil } /// Flip the coordinate system context.translateBy(x: 0, y: rect.size.height) context.scaleBy(x: 1, y: -1) /// Generate a white image UIColor.white.setFill() context.fill(rect) context.setBlendMode(.destinationIn) if let cgImage = symbol.cgImage { context.draw(cgImage, in: rect) } else { return nil } guard let result = UIGraphicsGetImageFromCurrentImageContext() else { return nil } self.init(image: result) } } Usage example: let iconTexture = SKTexture(systemName: "play.fill", pointSize: 17, weight: .bold) let sprite = SKSpriteNode(texture: iconTexture) sprite.colorBlendFactor = 1 sprite.color = .systemBlue addChild(sprite)
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Jul ’25
Reply to Avoiding SKView Stretching During Layout Animations
Interested in a solution to this issue as well. override func didMove(to view: SKView) { scaleMode = .resizeFill view.contentMode = .center // This is the closest working solution indeed. But not quite there yet. } The documentation of setNeedsDisplay() method says: If your view is backed by a CAEAGLLayer object, this method has no effect. A CAEAGLLayer is "a layer that supports drawing OpenGL content." SpriteKit probably used that, then moved to Metal, and the same limitation still applies. But this is only speculation. Source: setNeedsDisplay() CAEAGLLayer
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Oct ’24