I’m trying to get my character to slowly get slower and slower as they walk, but for some reason my equation doesn’t seem to do that. my suspicions is that performance.now() needs to be updated in the animate function somehow but I’m not sure how to do it.
let speed = 5 - (0.1 + (performance.now()/1000)) ;
and the equation is for it’s velocity is:
velocity.x -= velocity.x * speed * delta;
velocity.z -= velocity.z * speed * delta;
when I just put a normal number for speed, whatever number I put it changes the characters speed; so I know that works, but trying to get his speed to change over time doesn’t seem to work, so what am I missing