The question I asked probably isn't very clear, so I'll explain. If I have an x and y velocity, where the y goes towards the bottom of the screen, and the x goes towards the right of the screen, how would I convert the x and y velocity so that the y goes from the point to the particle at hand, and the x goes at a 90 degree angle from the y? If that explanation wasn't clear, then the reason I need to do this is so that I can minus a velocity as a particle tries to go away from a gravity source, but that source isn't just at the bottom of the screen.
What I have:Examples would be appreciated