I want to reset my p5.js sketch. The current way resets my gamestate, but not the deltaTime. The problem is, that I calculate my movement by a factor of the deltaTime. This means if I reset my gameState and call the noLoop function the deltaTime (which counts the time between two frames) continues counting. And as soon as I reinitialize my sketch and call the loop function, I have a big deltaTime and also a big movement of my objects. But as a restart should be, everything has to start at zero and not already in movement.
Is there any way to prevent this behavior?
Thanks and sorry if my English is trash