We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How can I smooth/easing the animation out? so it looks more like it would be floating instead of wiggling. The ellipse is wiggling... is there a possible solution for this, to smooth it out, like it would "float in the space"?
void Wiggler () {
// variables
float x, y;
float ex, ey;
x = width/2;
y = height/2;
ex = x;
ey = y;
// value
x += random(-10, 10);
y += random(-10, 10);
// smoothing/easing
ex += (x - ex) * 0.5;
ey += (y - ey) * 0.5;
ellipse(ex, ey, 625, 625);
}
Answers
https://processing.org/examples/easing.html
it doesn't work... can't figure it out:
runnable examples will get you better results.
the problem is, i can't find any examples. Only mouse following examples...
do you have runnable code? then post that.
currently we have one method. so we have to write everything else ourselves. this means two things: a) we won't bother or b) we will have different code to you. neither of which will get you quality answers.
yes, here:
something.
we've done easing before. the above uses sine wave to accelerate out of the initial position and decelerate into the new target position
the problem is the movement of the target - it's just random so you do see sudden changes of direction, which isn't great.
cool thank's! i've got only one problem. if i create a separate function of this code, it keeps flashing? i don't know why.