How to overlay a 2D animation in Marker Tracking?
I'm using the marker tracking template, and essentially I am trying to make a lens where the user can detect the marker image (which would be a logo), and the logo would become a flat animation. For OLCs, similar in concept to our badges. The only tutorial I've found is for a prior update, and I think some of the language is different.
Thank you!
Hi, emilyg1130!
You can follow next steps to achieve desired behavior:
1. Open a Marker Template
2. Import your logo marker ( click AddNew -> ImageMarker on the Resources panel).
3. Select Image Marker [EDIT_ME] SceneObject and set Marker parameter of a MarkerTracking Component with your imported marker (on the Inspector Panel)
4. Delete Mark The Monster [REMOVE_ME] SceneObject and create New-> Image Object instead. Make it a child of the Image Marker [EDIT_ME] SceneObject.
5. Import your 2D Animation and set it as a texture of newly created Image Object
Now animated logo will appear on the marker instead of the 3D model.
If you want 2D animation to start when marker found you can use Behavior script for this purpose.
1. On the Objects Panel click Add New -> Helper Scripts -> Behavior
2. Select a Behavior SceneObject on the Objects Panel and configure Behavior Script parameters on the inspector panel like this :
You can copy Behavior script and create another behavior on MarkerLost if needed
You may also need to turn off Always Play parameter on the 2D Animation file in this case.
Hope it helps!
Best
Olha
Thank you!