Bobrocket Posted December 12, 2015 Posted December 12, 2015 Take the following: Where point B moves towards point A in a curvey fashion. I have this code: double theta = Math.atan(diff.getY() / diff.getX()); double newX = Math.cos(theta); double newY = Math.sin(theta); x += newX; y += newY; Where diff is a vector of ((a.x - b.x), (a.y - b.y)) In theory, this should work, however: (where point A is the mouse position and point B is the ball) How would I go about fixing this?
Volta Posted December 12, 2015 Posted December 12, 2015 moves in a curvey fashion. kinda like yur mum 3