erase image on impact
in
Programming Questions
•
1 year ago
Hi.
First of a big thanks to "jbum" who have helped me with half of my coding..
Now...
I have a comet (komet.png) that I'm throwing at earth (earth.png)
On collision i want my comet to disapear and display tha word BOOOM
on the impact location.
For the moment Im sending the comet outside the screen, but I assume it will create LAG
when I spawn more and more comets...
How do I erase or kill an object in a simple way (on impact:) and can I do this in just "void collision"?
looks like this right now:
void collision(){
if ( dist(x, y, i1, i2) < i3) {
println("hit");
// x = 1000000;
// y = 1000000;
i++;
Font2 = loadFont("PressStartK-12.vlw");
textFont(Font,12);
text("BOOOM",x,y);
}
1