Example 1: Lerp Follower
Code
let x = 200;
let y = 200;
function setup() {
createCanvas(400, 400);
noStroke();
}
function draw() {
background(252);
x = lerp(x, mouseX, 0.08);
y = lerp(y, mouseY, 0.08);
fill(30);
textAlign(CENTER);
text('Move mouse', 200, 24);
fill(255, 45, 140);
circle(x, y, 60);
}Try this: Change the lerp factor for tighter or floatier follow.