How to hide the background (marker tracker) when animation starts playing?

Mahu
Mahu Posts: 1

I'm trying to create a lens that plays a 2D animation (image sequence /gif) when the camera is pointed at the marker tracker. I'd like the marker to become invisible to the user when the animation / marker tracking starts as the animation has transparency. Is this possible?

Answers

  • Aleks Brzoska
    Aleks Brzoska Posts: 12 🔥

    Hi @Mahu !

    Try this:

    1. In your 'objects' section, click '+' and add a new scene object.

    2. Make sure the scene object is selected and in the 'inspector' section, press 'add component' and choose 'script'

    3. Then press 'add script' > '+' in the top left corner of the pop up window > 'helper scripts' > 'behavior'

    4. Fill in the script settings so that it matches the image here:

    For 'Looking Object', select your main camera.
    For 'Look Target', select your marker.

    You can experiment with the 'response type' to better suit your needs in case you don't want to completely disable the marker once user aims camera at it.

    I hope this helps!