1
Graphics / Re: Drawing a short line between Sprite & Mouse
« on: June 11, 2018, 06:48:29 pm »
You could compute the vector (the actual arrow, direction vector) and then normalize it (meaning chaning it's size to 1, you can easily check how to do that by checking the internet.
Then you can multiply this vector by a constant to get a fixed length (and then return from your vector to your line with math magic)
Then you can multiply this vector by a constant to get a fixed length (and then return from your vector to your line with math magic)