realitykit

Build augmented reality experiences with RealityKit and ARKit in Swift.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/KumarAdi8/AgentKit --skill realitykit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: realitykit
Source: https://github.com/KumarAdi8/AgentKit/tree/main/skills/realitykit
Command: npx skills add https://github.com/KumarAdi8/AgentKit --skill realitykit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

RealityKit simplifies the complex, platform-specific work of building augmented reality scenes by providing concrete patterns, examples, and checklists for rendering, entity management, placement, and interaction so developers avoid common performance and permission pitfalls.

Core Features & Use Cases

  • RealityView & Camera Integration: Guidance for setting up RealityView, handling camera permission, and verifying ARWorldTracking capability before presenting AR content.
  • Entity Creation & Loading: Patterns for programmatic mesh generation, asynchronous USDZ/model loading, adding components (physics, collision, input), and managing ECS-based behaviors.
  • Placement, Raycasting & Interaction: Raycast-based placement, anchoring strategies for planes or world transforms, gesture-driven interactions (drag, tap), per-frame updates, and performance recommendations for production AR apps.

Quick Start

Add a RealityView to your SwiftUI view, asynchronously load a ModelEntity named robot, anchor it to the first detected horizontal plane, and enable collision and input components so it can be placed and dragged.

Frequently Asked Questions about realitykit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load a 3D model asynchronously in RealityKit and anchor it to a plane?

Loading a 3D model asynchronously in RealityKit uses async ModelEntity loading patterns. You then anchor the loaded entity to a detected plane using ARWorldTrackingConfiguration, enabling stable placement within the RealityView before rendering the scene.

How do I handle camera permissions and check AR capabilities before starting an AR session in Swift?

Handling camera permissions requires checking camera access status before presenting AR content. You must also verify ARWorldTrackingConfiguration capability detection in your iOS app to ensure the device supports the required augmented reality tracking before initializing the RealityView session.

What is the best way to manage gesture-driven interactions and raycasting for 3D entities in SwiftUI?

Managing gesture-driven interactions and raycasting involves using ECS component usage for collision and input targeting on your 3D entities. You apply raycast-based placement strategies to map drag and tap gestures directly to entity interactions within the RealityKit scene.

Can I use RealityKit with Swift 6.3 and iOS 26 for per-frame scene updates?

Yes, RealityKit supports Swift 6.3 and iOS 26+ projects for per-frame scene updates. You can subscribe to SceneEvents updates to manage continuous entity behaviors and apply performance tuning recommendations to maintain stable AR rendering frame rates.

Why do my AR entities fail to register collisions during gesture input in RealityKit?

AR entities fail to register collisions if they lack proper ECS component usage for collision and input targeting. You must explicitly add collision and input components to your ModelEntity so the system can detect raycast intersections and handle gesture-driven interactions correctly.