Sprites animation time offset ?
in
Programming Questions
•
2 years ago
Hi Processing Forum,
this is my first post and i start with a question.
I'm working on animated sprites and flocking sketch.
Since few days i'm trying to code a software to do in real time like in this video. Here, i'm using after effects with some expressions in motion script).
As a starting point for the software, i took this really cool sketch uploaded by Cinchbug.
This code's working like a charm. I'm using my own sheets, i add some P5Control and Kinect Control...
Everything is ok but i want to change the sprites time randomly.
Not complete random frames but just a delay between every sprite animation loop.
In the Cinchbug applet you can see that every guys are synchronize, i don't want synchronization. Look at my videos to see what i mean.
I don't have any idea how to code this. Everything i try fail in this case but i
guess the problem can be fix here (i could be wrong).
- pushMatrix();
- translate(pos.x, pos.y);
- image(sprite[heartbeat++], 0, 0);
- popMatrix();
- //make the loop for a 10 frames animation
- if (heartbeat >= 10) heartbeat = 0;
Do you have any idea how to fix this ?
Thanks for your help
1