Post

Replies

Boosts

Views

Activity

Post processing in VisionOS
WWDC21 had a cool demo project with fish, with a watery, misty look (Dive into RealityKit). It used post processing in RealityKit, but the ARView class isn’t available in VisionOS. Can CompositorLayer be used instead for post processing in full immersion?
0
0
47
20h
Component with SIMD3<Float>
I want to use SIMD values with a design time component. public struct SomeComponent: Component, Codable { public var Magnitude: SIMD3 = .zero } Is extra work required? I had understood that serialization of simple values including SIMD would be handled by Reality Composer Pro. At run time I get the error: decodeComponent: Unexpected error: keyNotFound(CodingKeys(stringValue: "Magnitude", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: "Magnitude", intValue: nil) ("Magnitude").", underlyingError: nil)) Asset deserialization failed. Asset type "SceneAsset". Details: Failed to deserialize "/container/@shared/17/object". Reason: Failed to deserialize Swift Codable component of type RealityKitContent.SomeComponent.
2
0
334
Sep ’24
Entering full immersion without grab bar and close icon
I'd like to enter a fully immersive scene without the grab bar and close icon. The full immersion app that comes with Xcode doesn't exit the immersion state when "x" is hit, but all the grab etc disappears - if I could only do that programmatically! I've tried conditionally removing the View that launches the ImmersiveSpace, but the WindowGroup seems to be the thing that puts out the UI I'm trying to hide... WindowGroup { if(gameState.immersiveSpaceOpened){ ContentView() .environmentObject(gameState) } }
1
0
465
Jun ’24
Entity.Move Translation value is changed in subsequent frames - ECS
If I apply a translate transform inside a RealityKit.System update function - then in subsequent calls to update the value of the translation, SIMD3 has changed somehow. Why does it change? func update(context: SceneUpdateContext) { entity.move(to: Transform(translation: SIMD3(0, 0, -2)), relativeTo: nil) Next frame in update and print("😬 \(entity.transform.translation)") Displays: translation: SIMD3(0.0, 0.2, -0.79999995) I'm missing something, hopefully obvious!
0
0
437
Mar ’23