So I have my character, who when I press the mouse button, should fire off a few lasers, to take out those bad guys.
Currently I add my little laser. Then I use this:
this.velocity.x = (MousePos.x - StartPos.x) * bulletSpeed
//same for Y
(I have also tried this)
this.x += (MousePos.x - StartPos.x) / bulletSpeed
//same for Y
Now this is would be great except for the fact that the laser doesnt move at the same pace. What I mean by this is that if the mouse is, lets say, 1000 pixels away, or 500 pixels away, it will arrive in the same amount of time, which means it goes faster if the mouse is farther away.
What I need to know, is how to make it so that the object will move at a specific speed, no matter how far it needs to go.
Thanks,