If you've added a 3D object with an animation included in the file, you can use the animation playback controller to easily set when the animation plays, stops and pauses.
For more complex with baked-in animations, like switching between more than one animation or controlling progress, you'll need to use other patches.
To set how each joint in a 3D object's skeleton moves, follow this guide to animating an object with a skeleton.
To create a new animation controller:
The animation playback controller will be listed in the Assets Panel.
“Kako” by manoeldarochadeoliveira is licensed under CC BY 2.0
You'll need to assign the animation playback controller to the object in the scene you want to animate. To do this:
The animation needs to be connected to the animation playback controller.
The animations your object contains will be listed in the Assets Panel:
To connect an animation to an animation playback controller:
To adjust the speed, simply:
If you select the animation playback controller in the Assets panel you'll see three options under Properties in the Inspector - Play, Pause and Stop.
Clicking the arrows next to these properties will create patches to represent them. You can connect these to other patches, to add interactivity to an animation.
The simplest thing you can do is to make an animation play in response to a user interaction. To do this:
Right-click in the Patch Editor, and select any interaction patch that creates a boolean signal (a signal that's either on, or off). For example, the Mouth Open, Screen Tap and Happy Face patches.
Connect the interaction patch, in the example below we've used Screen Tap, to the play port in the animation playback controller patch.
Your graph should look like this:
If you select Simulate Touch in the Simulator, you can test this effect. The animation should play when you click the screen:
In the example below we've also turned off the option to Play On Start. This time we've created patch to represent both the Play and Pause properties of the animation playback controller. We've combined these with the Screen Tap, Switch and Pulse patches.
As a result, when the screen is tapped the animation will switch between playing and pausing.
Choose an animation to control with the playback controller.
This will always say animation, because it's a playback controller that controls animations.
The duration of the animation.
Create a patch to control when the animation starts to play.
Create a patch to control when the animation pauses.
Create a patch to control when the animation stops.
Check this box to play the animation when the effect is opened.
Check this box to continuously loop the animation.
Use this slider to adjust the speed of the animation.
The 3D object that contains the animation.