Random animation
Unsolved
QML and Qt Quick
-
Hi,
I want to animate property X or Y of my object and I want to change them -10 to +10 pixels from its current position (it will vibrate my object). I want to make N animations in one sequence (N = 8 to 20 and N is randomly selected at the beginning of the sequence). Every animation in the sequence must be regenerated to new random values on the sequence start.
Can you please help with that? -
Hi,
You can use JavaScript's Math.random() to generate random numbers in QML.
Check out this older thread in the forum.
Cheers,
Lorenz