Without animation
The easiest way to do that with patches is to have a Counter
patch that will increase each time the Tap
event is triggered. The counter can take values in a range from 0 to 3 (including both ends). Then its Value
is just Multiplied
by 90 and is sent to the rotation patch of an object that needs to be rotated. This is done with the Pack
patch that, in this case, accepts the value for just one rotation axis and the other two are always zeros. You can adjust it for your own way of rotation.

With animation
Below is one of the solutions how this can be animated. Tap
triggers the Animation
to start immediately, but animation reset and changing the Counter
happens with the Delay
, which is the same as the animation duration. Then, with Multiply
and Add
patches we can figure out the start and stop values that the angle of rotation should take, and feed them to Transition
patch. The last Swizzle
patch can be replaced with Pack
patch, but swizzle is probably a little bit more efficient.

Other Notes
By the way, using custom buttons and other 'self-made' UI elements is not advised by Spark AR official guidelines.