How to make a snowboarder image leave a fading trail :D
in
Programming Questions
•
6 months ago
Greetings! I am trying to make a sketch that has an image of a snowboarder that follows the mouse and leaves a fading trail of the image behind it. I would like the image that follows the mouse to stay, and the trail of images behind it to slowly fade away. I would love some help. Here is what I have so far.
- PImage dude;
- PImage bg;
- void setup() {
- size(600, 600);
- background(0);
- dude = loadImage("duder.png");
- bg = loadImage("temple.jpg");
- background(bg);
- }
- void draw() {
- image(dude, mouseX, mouseY);
- image(dude, mouseX, mouseY);
- tint(255, 5);
- image(bg, 0, 0);
- fill(255);
- image(dude, mouseX, mouseY);
- }
1