Use the animation playback controller to easily play, stop and trim baked animations in 3D objects.
You can also add interactivity with the animation playback controller. For example, playing the animation in response to a tap anywhere on the device screen with the Screen Tap patch, or on a specific object in the effect with the Object Tap patch. The fastest way to do this is from the Inspector. You can also create a controller from the Assets panel and assign it to an animation later.
To create a new animation playback controller:
The asset’s first animation will be auto-assigned to the animation playback controller, and it will start playing immediately.
“Kako” by manoeldarochadeoliveira is licensed under CC BY 2.0.
To choose a different animation clip from the list:
“Kako” by manoeldarochadeoliveira is licensed under CC BY 2.0.
To create a new animation playback controller:
The animation playback controller will be listed in the Assets panel.
“Kako” by manoeldarochadeoliveira is licensed under CC BY 2.0.
Next assign the animation playback controller to the object in the scene you want to animate:
The animation needs to be connected to the animation playback controller.
The animations your object contains will be listed in the Assets panel. Expand the asset to see them:
To connect an animation to an animation playback controller:
With the animation playback controller selected in the Assets panel, in the Inspector you'll see Properties labeled Play, Loop, Reset and Trim
When the box to the right of Loop is selected the animation will play on a loop as soon as the effect is opened.
Clicking the arrows to the left of Play and Reset will create patches to represent these properties. You can connect these to other patches to configure when the animation plays and resets — for example in response to an interaction from the person using your effect.
Under Trim, drag the blue handles to set new start and end points for your animation. You can also use the trim feature to make multiple clips from the same animation .
Adding interactivity to your animated effect is simple. In this example we'll make the animation play in response to interaction
Start by creating a patch for the Play property of the animation playback controller:
Now create the interaction patch. There are lots to choose from. To drive the animation, you'll need an interaction patch that creates a boolean signal (a signal that's either on, or off). For example, the Mouth Open, Screen Tap or Object Tap patches. To create an interaction patch:
Connect the output of the interaction patch to the Play input port in the animation playback controller patch. A Switch patch will be created automatically. Joining these 3 patches together creates a switch that will turn the animation on or off in response to an interaction.
Here's how your graph will look:
If you're using the Object Tap patch, you'll need to attach a patch representing the object in the scene to the Object input port in the Object Tap patch. Create a patch representing the object by selecting the object in the scene panel and dragging it into the Patch Editor.
Here's how your graph will look:
In the Simulator, select Simulate Touch to test the effect. The animation should play when you click the screen:
If you connect a patch representing the Reset property instead of the Play property the animation will reset instead.
Animation Clip
Choose an animation to control with the playback controller.
Type
This will always say animation, because this playback controller controls animations.
Duration
The duration of the animation.
Original FPS
The animation's frame per second.
Play
Create a patch to control when the animation starts to play.
Loop
Check this box to continuously loop the animation when the effect is opened.
Reset
Create a patch to reset the animation.
Speed
Use this slider to adjust the speed of the animation.
Trim
Drag the blue handles to set new start and end points for your animation.
Used By
The 3D object that contains the animation.
Interactions
Create a patch to represent the animation playback controller.