I am programming a game for practice and I am trying to design a algorithm that finds the x and y vectors that the "bot" will need to follow in order to reach the players exact x and y coordinates. I already used Pythagorean's theorem to find the distance between the bot's coordinates and the player's coordinates. So from here I could easily find all the degrees of the triangle but I have no clue how to convert that into x and y vectors.
as an example if I set the bot to move at vector x = -5 then it would move -5 pixels (left) across the screen every time the monitor refreshes.
I know all x and y positions of the entities at all times.
So is there anyway to just take the degree from one corner of the triangle and convert it into vectors that the bot can move on?
Thanks.