Click animation feedback

The SimpleIcons button prefabs had a simple animation attached that will swing the button as if the toolbar were suspended in space with a rod. You can open the animation asset if you want to look into how it was made. All we need to do is trigger it with a Click command.

However, it doesn't work to just play the animation when clicked, because most of our buttons immediately hide the toolbar. So we'll add a second's delay before actually executing its action.

Open PictureAction.cs and change it to read like the following:

File: PictureAction.csusing UnityEngine; using HoloToolkit.Unity.InputModule; public class PictureAction : MonoBehaviour, IInputClickHandler { public PictureCommand command; protected PictureController ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.