Augmented Reality Mini-Robot through the lens of iPad

Using AR-Foundation ARKit to Spawn Min-Robot through the lens of iPad…

Anurag Chawla
3 min readOct 6, 2021

Here used detected horizontal planes in the real world to spawn our cute sphere mini-robot. Then we added some joystick controls to our robot and used physics and an Animation Controller to move him around the world.

Assets for mini-robot and joystick control as under:

Mini-Robot from Asset Store

I have set up using AR Foundation, ARKit XR Plugin through Package Manager and set the XR Plug-In Management for iOS ARKit in Unity.

SetUp- XR Plug-in Management for ARKit

Provisioned the target platform iPad (iOS) for this Mini-Robot using ARKit.

Selected Platform -iOS to provision for target Platform- iPad

In Design and Implementation of Mini-Robot..

Design and Created in Unity using ARKit-AR Session, AR Session Origin having AR Camera

The steps that are taken into consideration.

  • Created a scene with plane detection
  • Imported our robot asset and joysticks assets from the asset store
  • Created a prefab of our robot character
  • Created a TapToPlace script to spawn our robot on a detected AR plane- using ARRaycastManager.

This TapToPlace Script checks if the robot is not spawned, when I iPad screen is touched , it gets the position screen and Raycast into the world using the touch position. Raycast function returns the hits which is the closest plane we touched on iPad & at that position spawned the Mini-Robot.

Script- TapToPlace
  • Looked at Animation Controllers
  • Created a RobotControls script to use the joystick to move our robot around the world….!!
Script-RobotControls

Finally here is the mini-robot through the lens of the iPad…

Augmented Reality (Mini-Robot with JoyStick Controller — using iPad)

--

--

Anurag Chawla

Emerging Technologies - Power Virtual Agents | AI Chatbots | Multi-Cloud & DevOps | UI Technologies - React , Angular | Gaming Technolgies - Unity, XR- AR/VR