[NOTICE]: The ball might feel a little weird, this is because the throwing physics is slightly altered to add curving of non-spherical objects in flight e.g. javelins. Probably my greatest project yet and my first physics engine! Space to get a rock The arm points towards the mouse, just do a throwing action and it'll throw the rock F to clear rocks HOW IT WORKS: It calculates what the speed of your arm is via looking at the difference in x-position the arm has every 0.01 seconds. When this value is over 2, it throws the rock! The value can go much higher over two, of course, which allows short and long throws
This was originally developed for my physics survival game RUBICO, however I decided this would be cool to share until RUBICO releases :) UPDATE: Used cartesian plane distance formula, you can now throw upwards! sqrt(squared(x2-x1)+squared(y2-y1)) :) for anyone interested in the formula