Demo Project to place/hang an image on a vertical plane using Unity ARFoundation (ARKit/ARCore)
Pixabay public API is used to search for an image to place on a wall.
Vertical Plane Detection
After an image is selected, the AR Scene opens and starts searching for vertical planes. Once a plane is found, the image gets automatically placed on the plane. The center of the screen is used to control the position on the plane.
The position of the placed image can be modified using touch gestures.
Once satisfied with the current position, a tap on the image fixes it in place.
- Unity Editor 2018.3+
- All dependencies are defined in Packages/manifest.json
To test the plane detection you need a device with ARKit or ARCore support.
The project can also be run in the Editor, the ARPlaceImageScene contains a disabled GameObject “WallDev”. This GameObject simulates a Wall, very useful to test some changes without having to deploy on a mobile device.
Check out the video i have made to demonstrate the dev workflow.
I built this code as an evaluation to find out what is currently possible with the ARKit/ARCore frameworks plane detection algorithms.
If you see any abvious improvements i would love to here from you!
the project uses the following assets