How to make an animation happen when tapping a button from Picker UI in Spark AR?

771 Views Asked by At

I have followed the Picker UI Patch tutorial to get buttons on my screen. However, I would like the Picker UI buttons to play an animation. I'm not sure which Patches to include in my project. The animations are listed in Assets. Here's a picture of what I have so far

1

There are 1 best solutions below

0
On

You need an animation Playback Controller for each Animation.

So for each animation, do - Add Asset > Animation Playback Controller. Then, in the Properties Panel > Animation Clip, chose the corresponding animation.

Then user the Option Picker connected to the Picker UI to choose your animation.

Finally output that to the animation property of your 3d object.

patch example