As you can see, rockets are avoiding red balls.
But they always turn right. How can i make them to calculate where to turn to avoid balls faster (depending on ball centre and rocket movement vector)?
I don't kow if it's clear, so there's example:
If rocket moves right (angle 0) and if it collides with ball, construct should check:
if ball.y > rocket.y then rocket rotate right
if ball.y < rocket.y then rocket rotate left
Problem is that rockets have different angles...
There's CAP: http://tecbug.pl/pub/c2/avoidingballs.capx