2D Animation: Idle loop > tap > animation + sound > Idle loop
Please let me know if this has been addressed previously.
Working on a 2D lens with two sequences:
#1) Looping/idle PNG sequence
#2) PNG sequence + sound byte
So sequence 1 loops, user taps to active sequence 2 to play once, back to playing sequence 1 loop.
I tried the tap through tutorial using sprites but failed at getting it to work. Ideally I'd like this to be similar to the Cutout Lens template.
The Fullscreen Template was actually built for this type of experience. It allows you transition between multiple states via tap or time. A state is simple which objects are shown, which sounds are playing and which animations are playing.
Check out the Fullscreen Template tutorial video here to see how it works:
If you don't already have the Fullscreen Template, make sure to update to the latest version of Lens Studio.
Finally, while the Fullscreen Template focuses on screen attached Billboards, you can add Sprites that exist in 3D space as well by adding them to the scene and then Enabling and Disabling them in the state's Enable object and Disable objects. Note, by default, the Fullscreen template doesn't include World Tracking (which locks objects in the world like the cutout template). It's easy to add though. Select the main Camera, called "Camera", and add a "World Tracking" component to it. Now, when you add new Sprites, they'll be locked to the world (as long as they aren't a child of the camera). Hope that helps!
Awesome thanks Travis! Is it possible for the user to move the world tracker by dragging it?
Yes, add a Manipulate component and a Touch component to the added object. Then, add a box as a child to that object that represents the touch area. Then, set this box to the mesh field in the touch component. Make sure to also enable Drag in the Manipulate component to enable the drag. All of the templates do this so you should be able to look at them to see how this works. In the templates, the Manipulate and Touch component are on the WorldObjectController object in the templates.