Use the Object Tap patch in Meta Spark Studio to make something happen in your effect when someone taps a specific object, like a plane or a mesh.
In this guide, we'll make an object get bigger when someone taps on it:
You could use other screen interaction patches to achieve similar effects, like Screen Tap or Screen Pan.
To create an Object Tap patch:
Two patches will be created:
Next create a patch representing the property of the object you want to change. For this example:
You could choose a different property instead. For example, Position to move the object to a different position or Visible to make it disappear.
Right-click in the Patch Editor and select:
You’ll see 6 patches in the Patch Editor:
Connect the patches, so your graph looks like this:
In the Transition patch, adjust the values next to Start and End to set the starting and ending scale of your object. We set:
Note the flower gets bigger when clicking anywhere on the plane object, represented by the blue square in the Viewport. This is because the Object Tap patch is responding to taps detected anywhere on the plane, even the parts that appear transparent because we've applied a transparent PNG texture.
If we wanted the object to respond only to taps on the flower part of the texture, we would need to attach it to a 3D mesh object with a similar shape and size to the flower, instead of the square plane object. For example, a flat, circular mesh, made in external software.