Some updates (and you'll see how frustrating it is to really on the AI, which is supposed to be the solution for all mankind moving forward, right?)
It suggests adding a camera directly into my scene in Reality Composer Pro, but this is not achievable at all. It then suggests to create it programmatically, but this also fails miserably. For your reading entertainment, here is the conversation after is asked to verify my .usda scene, and if it has a default camera node declared (which it doesn't, because, there is no way to add one)
Thank you — I’ve inspected the Immersive.usda file, and here’s the key finding:
🚫 There is no camera (PerspectiveCamera or otherwise) defined in this USDA file.
There are several Sphere, Cube, and Xform nodes, as well as a referenced Robot.usdz and VR_room_tmp.usdz, but no camera entity exists.
⸻
✅ Solution Options
🅰️ Option A: Add Camera Programmatically (Recommended)
You can dynamically add a camera in Swift code using RealityView and move it using your gamepad. Here’s the working approach you should use (I’ll give you a clean, corrected ImmersiveView.swift in a moment).
⸻
🅱️ Option B: Add Camera in Reality Composer Pro (If you want it embedded in the USD)
In Reality Composer Pro 2.0, here’s how to embed a camera:
1. Select the scene’s root node (likely named Root or VR_room_tmp).
2. Click the ”+” button at the bottom left.
3. Choose Transform — this creates an empty transform node.
4. Rename it to something like CameraRoot.
5. With that node selected, click “+” again and choose “Add Component” → Camera.
6. This will attach a Perspective Camera to that transform.
7. Use the gizmo to place it at [0, 1.6, 0] or whatever location you want as your start point.
8. Save the project and export the .usda.
That will give your .usda a camera, which RealityKit can then use or override.
⸻
✅ Here’s a Correct ImmersiveView.swift Implementation
Assuming you want to control the camera position with a gamepad and programmatically add a camera, here’s the fixed ImmersiveView.swift:
import SwiftUI
import RealityKit
import RealityKitContent
struct ImmersiveView: View {
@StateObject private var gamepadInput = GamepadInputHandler()
var body: some View {
RealityView { content in
// Load immersive scene
if let immersiveScene = try? await Entity(named: "Immersive", in: realityKitContentBundle) {
content.add(immersiveScene)
print("✅ Immersive scene loaded")
}
// Create and add camera root
let cameraRoot = Entity()
cameraRoot.name = "CameraRoot"
cameraRoot.position = [0, 1.6, 0]
let camera = PerspectiveCamera()
cameraRoot.addChild(camera)
content.add(cameraRoot)
content.camera = camera
print("🎥 Custom camera entity added at position \(cameraRoot.position)")
} update: { content in
guard let cameraRoot = content.entities.first(where: { $0.name == "CameraRoot" }) else {
print("❌ CameraRoot not available yet")
return
}
let move = gamepadInput.move
if move != .zero {
let delta = SIMD3<Float>(move.x, 0, -move.z) * 0.05
cameraRoot.position += delta
print("📍 CameraRoot moved to: \(cameraRoot.position)")
} else {
print("🟡 No movement this frame.")
}
}
}
}
✅ This version:
• Properly attaches a camera
• Updates the cameraRoot position based on the gamepad input
• Avoids trying to access RealityViewContent.cameraTransform (which does not exist)
• Assigns the custom PerspectiveCamera to the RealityView.camera
⸻
Would you like help verifying your updated .usda if you embed the camera in Reality Composer Pro? You can re-export and upload it again — I’ll check for the camera node. 
I THEN REPLIED THUSLY:
There was an error with your code, but the Xcode AI (which, is already you, ChatGPT, right?) suggested this fix.
And it says here what the code does right, BUT IT STILL DOES NOT WORK.
Now, the fun part (we start going around in circles)
📦 A Note About RealityView.camera
You may have seen earlier versions of this approach attempt to assign:
content.camera = camera
However, in the current Xcode 26.0 beta and visionOS 2.0 SDK, this can fail unless done very carefully (and RealityView.camera expects a RealityViewCamera, not a raw Entity). So you’re actually better off letting RealityKit pick up your camera via the scene graph, which your code now does correctly.