Is there any reason you're not calculating the hit delay of the enemy by the tower's bullets with its velocity? I think you have all information needed right there. Ofc, its still just an aproximation as the target will probably move, but i dont think anyone will notice. Also note, that if i understand your code correctly, if there is another enemy getting to be the "nearest" while the cooldown is ticking, I think it would never hit the original enemy. But I doubt it will happen often, just now it could drop shots when this happens 🤔
I'm fan making in-game tooling, because that creates in-game level editor.
Is there any reason you're not calculating the hit delay of the enemy by the tower's bullets with its velocity? I think you have all information needed right there. Ofc, its still just an aproximation as the target will probably move, but i dont think anyone will notice. Also note, that if i understand your code correctly, if there is another enemy getting to be the "nearest" while the cooldown is ticking, I think it would never hit the original enemy. But I doubt it will happen often, just now it could drop shots when this happens 🤔
Where do I view your dev content?