How to set the a direction

Godot Version 4.0

Question

I’m trying to make a 2d shooter.I saw some tutorials but cannot understand what is happening on the code when the bullet goes towards the mouse position.I alredy know how to create the bullet when you click but im struggling to make it goes towards the mouse position.Can someone explains me how it works? Sorry if the text was confusing.

What’s your exact problem?

2 Likes