What I need to do is make the small balls bounce off the lines, controlled by the mouse.
Triganometry is needed and I have found code that can help.
//float a = atan2(mouseY-height/2, mouseX-width/2);
// float d = sqrt( dx*dx + dy*dy );
//float x = sqrt((mouseY^2)+(mouseX^2))
//float y = sqrt((500-mouseY^2)+(500-mouseX^2))
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment