No worries, I may not have been precise enough with the game I’m making.
The player will build his own weapon during the game, using “modules” to modify his weapon and projectiles (think Noita if you know this game). So the cooldown of the weapon might go below the physics frame time, at wich point I effectively need to spawn multiple projectiles during the same frame.
If the projectiles are spawned during the same frame and I dont use some kind of logic to make them “catch up”, all the “same frame projectiles” will be superposed, which I really don’t like and give a “discrete space” feel, where projectiles with specific speed can only be at specific points relative to the player, giving the illusion that they are static when continuously shooting.
Also, the shooting is continuous, you are shooting as long as your mouse click is pressed, so number of projectiles is not tied to amount of player’s input.
Pressing your button for 5 frames might result in 25 projectiles, with a fast enough weapon, and I want these 25 projectiles to be equally spaced.
I also connot predict easily where the projectile should be when I finally shoot it, while it should have been spawned 5ms ago, as player can apply path modifications to the projectiles, so it can be far more complex than calculating a point on a linear trajectory using only projectile speed. I really need to calculate what happened to this projectile during these 5ms, thus why I call its _physics_process().
Here, a simple example where I shoot 100 bullets/s.
Without catching up, multiple projectiles superpose and we never see more projectiles than 1/frame:
With catching up, projectiles can be placed at an exact position, because they
actually travelled during their own catching time:
Is my case more clear ? Do not hesitate if you need more clarification or if you have other ideas on how to tackle this. Thanks for your time 