okay I have a code to add jitterness to an entity
``
VehicleJerk.prototype.update = function(dt) {
setInterval(()=>{
var plusOrMinus = Math.random() < 0.5 ? -0.005 : 0.005;
this.entity.setLocalPosition(plusOrMinus + this.entity.getLocalPosition().x, this.entity.getLocalPosition().y, this.entity.getLocalPosition().z);
}, 5000);
};
``
well this code adds jitter but the update function is so fast that the setInterval does nothing to slow down the process, I simply want to slow down the process and call that function every 5 seconds automatically, the update calls the function too fast, how can I achieve the 5 second interval between each call?