Bobrocket Posted December 12, 2015 Share 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? Quote Link to comment Share on other sites More sharing options...
Volta Posted December 12, 2015 Share Posted December 12, 2015 moves in a curvey fashion. kinda like yur mum 3 Quote Link to comment Share on other sites More sharing options...
Krys Posted December 12, 2015 Share Posted December 12, 2015 not sure Quote Link to comment Share on other sites More sharing options...
PurpleWard Posted December 12, 2015 Share Posted December 12, 2015 the answer is 69 degrees north west Quote Link to comment Share on other sites More sharing options...
ANIMA VESTRA Posted December 12, 2015 Share Posted December 12, 2015 Good luck Quote Link to comment Share on other sites More sharing options...
Fantabulous Posted December 12, 2015 Share Posted December 12, 2015 /r/math Quote Link to comment Share on other sites More sharing options...