# From developer to AR developer in 30 minutes - RealityKit live coding session

- Speaker: [Arad Seroussi](/wiki/speakers/arad-seroussi.md)
- Event: [Reversim Summit 2021](/wiki/years/2021.md)
- Video: https://www.youtube.com/watch?v=If_544UO3fw
- Transcript: [/transcripts/2021/08-If_544UO3fw.md](/transcripts/2021/08-If_544UO3fw.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [Game Development](/wiki/topics/game-development.md), [Mobile Development](/wiki/topics/mobile-development.md), [Frontend](/wiki/topics/frontend.md), [IoT](/wiki/topics/iot.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

This talk presents a live coding session demonstrating how to build an augmented reality application from scratch in just 30 minutes using Apple's RealityKit. The speaker explains the impact of the LiDAR sensor in modern mobile devices for precise 3D environment mapping and spatial tracking. Through a step-by-step example involving a game, the audience learns how to load 3D models, handle tap gestures via ray casting, and add basic animations and physics. The speaker encourages developers to enter the AR space now as hardware technology continues to evolve rapidly.

## Key points

- [2:08](https://www.youtube.com/watch?v=If_544UO3fw&t=128s) The speaker introduces LiDAR sensors, explaining how they bounce laser beams to calculate exact distances and generate 3D point clouds.
- [9:59](https://www.youtube.com/watch?v=If_544UO3fw&t=599s) The speaker reviews an Xcode project setup, explaining the core components like the app delegate, view controller, and the Reality Composer file.
- [12:09](https://www.youtube.com/watch?v=If_544UO3fw&t=729s) The speaker demonstrates how to load a 3D model in USDZ format and attach it to a horizontal plane anchor in the scene.
- [14:16](https://www.youtube.com/watch?v=If_544UO3fw&t=856s) The speaker explains ray casting as a method to convert 2D screen touch coordinates into 3D world space coordinates.
- [19:28](https://www.youtube.com/watch?v=If_544UO3fw&t=1168s) The speaker optimizes the application by preloading models and adding custom scaling and movement animations.
- [30:09](https://www.youtube.com/watch?v=If_544UO3fw&t=1809s) The speaker explains collision shapes and how to add physical volume to virtual 3D entities so they can interact with taps.
- [32:15](https://www.youtube.com/watch?v=If_544UO3fw&t=1935s) The speaker enables environment understanding and physics bodies to allow virtual objects to fall and interact dynamically with real-world surfaces.

## Takeaways

- Use LiDAR-enabled mobile devices to easily scan environments and place virtual 3D content accurately.
- Preload 3D assets and reuse them via cloning to prevent UI stutters and performance lags during runtime.
- Implement ray casting to successfully map 2D touch events from the screen into 3D space coordinates.

## Questions this talk answers

- How do you convert 2D screen coordinates into 3D world space positions in an AR application?
- What is the best way to avoid performance lags when repeatedly spawning 3D models in an AR scene?
- How do you enable collision detection and physics for virtual objects in RealityKit?

## Technologies

RealityKit, Swift, Xcode

## Tags

3d graphics, augmented reality, game development, ios, mobile development, sensors
