Making projectiles queue_free() at the last clicked Vector2

Godot Version

4.2.2.stable

Question

I was able to apply a max range to my character while shooting projectiles by utilizing timers but what I wanted to do at first was the scenario in the title.

This is how my shooting behaves right now. As you can see, the projectiles still go across the cursor which I would like to eliminate.
2024-06-28 22-21-26

I think you might be able to use a distance_to() call to check the projectile’s distance to its respective click position and queue free it when it’s <= 0.

1 Like