Split screen effect product juice ad

I'm trying to create an interactive lens ad where you can choose between two types of bottled juices. It starts of as a split in the middle, one half red juice, the other half orange juice. Then I want the user to be able to swipe left/right to choose between the two. Is this possible somehow?

I've found the Split screen effect script in the asset library, but it's only working for the face at the moment...

Answers

  • Bakari Mustafa
    Bakari Mustafa Posts: 174 🔥🔥🔥

    Yes, it is possible to create an interactive lens ad where the user can swipe left or right to choose between two options. To do this, you can use the Swipe Gesture component, which allows you to detect swipe gestures made by the user.

    Here is an example of how you can use the Swipe Gesture component to create an interactive lens ad:

    1. Create a new project in Lens Studio and import the Split screen effect script from the Asset Library.
    2. Add a Swipe Gesture component to your scene: Drag a Swipe Gesture component from the Object Library onto the root object of your scene.
    3. Set up the Swipe Gesture component: In the Inspector panel, select the Swipe Gesture component and set the "Swipe Direction" to "Left/Right".
    4. Add the Split screen effect to your scene: Drag the Split screen effect script from the Assets panel onto the root object of your scene.
    5. Modify the Split screen effect script: Open the Split screen effect script and modify the "onSwipe" function to detect left and right swipe gestures and change the split screen effect accordingly. For example, you could use an if statement to check the direction of the swipe and update the split screen effect accordingly.