Interactive Buttons for Mobile AR

Sang Kwak
code3100
Published in
2 min readApr 1, 2017

Week 5

For the purpose of utilising buttons in Mobile AR, I tried to attempt to implement it onto the game/object prototype that i made last week. C# was needed to be learnt a little this week in order to get the functions of the virtual buttons working in the prototype. How I’ve done this is through the use of the VirtualButton Prefab component in Unity and placed it around the object like shown below.

Initially the buttons were suppose to be able to move the ball across the field but the coding of the C# was way too advanced for my knowledge so i decided to go simply with an object appearing and disappearing in hope for a success for the features that could be added in the final product of the Mobile AR.

The scripts were really tedious since there were a lot of objects within the prototype as seen below. Furthermore I have tested various other scripts that could potentially disable an object at the start and have the object appear when a button is pressed in AR. These scripts include:

object.active = fasle;

Renderer.enabled = false;

The object reference however was the issue and further analysis is needed to get the script to work.

More work is still in progress in the coding area to make this work.

--

--