Now I have had some help and new ideas are flowing through my head. I've made these objects that almost look like lollies but when I click the mouse they go faster and look like some kind of insect. So I'm thinking of changing the lollie shape to more of an inscect shape and also I think I might change the face to an object that insects(fly's) hate or can bounce off. Anyway here is another new collide code and it bounces of my face and all of the objects avoid the face .
NEW COLLIDE CODE:
void collide() {
if (mousePressed == true) {
if (dist(ellipsex, ellipsey, x, y)< A) {
speedX = speedX * -1;
speedY = speedY * -1;
}
while (dist (ellipsex, ellipsey, x, y)< A) {
movement();
}
}
}
No comments:
Post a Comment