life like noise movement?
in
Programming Questions
•
1 year ago
Hey guys.
Have posted about this before but realised i was pretty vague! im basically trying to make a circle move in a life like way around its location, but never stray to far from.
just like in this example -
Code below is as far as i got working from one of the noise examples. The problem is -
1. cant see how to stop the circle just moving diagonally
2. The movement is way too fast
3. Dont completely get how noise works, and therefore why the circle starts down and to the right of the mouse.
thanks in advance!
rich
float xoff = 0.0;
void setup() {
size(400, 400);
}
void draw()
{
background(204);
xoff = xoff + .01;
float n = noise(xoff) * width;
ellipse((mouseX + n ), n, 30, 30);
}
1