Augmented Reality Mini-Robot through the lens of iPad
Using AR-Foundation ARKit to Spawn Min-Robot through the lens of iPad…
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:
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.
Provisioned the target platform iPad (iOS) for this Mini-Robot using ARKit.
In Design and Implementation of Mini-Robot..
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.
- Looked at Animation Controllers
- Created a RobotControls script to use the joystick to move our robot around the world….!!
Finally here is the mini-robot through the lens of the iPad…