I want to create a random rotation filter with Spark AR.
There’s a circle/wheel on the facetracker and each time you spin the circle/wheel it needs to land on another frame. The wheel exists of 7 parts.
Does anyone know the patch paths that goes well for this?
You might also need to offset it by 0.5/7 * 360 if you have issues with centering the items in the wheel.
If you need to have a spinning motion for a few revolutions, I think you could just add 720 to the stepped value.
It gets a little tricky if you want it to be seamless transitions. You could use some delay values to track the previous ending position and feed it back in to the starting position. I wrote an article on delay value in case you are unfamiliar with it.
I had look around with Spark AR and came to another solution for spinning the wheel.
I created now 1 PNG sequence for the wheel. When the randomiser stops on an option I want to show an image on screen. Do you know how I can ‘trigger’ the visibility of the image after the randomiser stops on number 2 for example?
If I do this the image (belong to number 2) shows up while it’s looping, but it needs to be visible after looping. Sorry, I’m quite new to this I think I miss a step in the path right?
You don’t need the option picker to select a number, since you are already getting a number from the random patch. You are correct in that you need to round the value, but more specifically, I think it needs to be floored. That will give you an integer value that you can use “equals exactly” to enable the answer image
Perfect, thank you! The only thing that still happens is that all the images run while the sequence is looping, but it needs to be shown after the sequence loop. Do you think that’s possible?
There is something in the library for this: “Store Value is a patch asset created using a Delay Value patch. This patch asset stores an input value the instant a pulse is fired.”