This could be turned into a non-static class so things like obstacle, self and targetPoint don't need to be passed as args.