Why are my bullets just going down?

Godot Version

4

Question

i have this code

bullet_instance.apply_impulse(Vector2(),Vector2(bulletspeed, 0).rotated(rotation))

#doesent this make the bullet move and rotate to where its going??? im new to programming and godot

#why are my bullets just going downn!!!

#i want to have my bullets move and go wherever my mouse is pointing

first, the first vector2 should be the impulse, not the second, as that is the offset position

second, your second Vector2 is going to the speed, not a direction. if the speed is 200, it will go 200px to the right

third, what’s the value of rotation?

fourth, why are you applying a function to a function?