I once wrote an aimbot tutorial that was pretty much the go-to tutorial for such matters. Actually struggling to find a copy of it with the pictures still intact. Not sure if links to other hacking websites are appreciated here, but here's a copy without the pics:
*************.me/forum/c-and-c/56976-aimbot-tutorial-using-memory-lol.html**
(I am evobyte)
A similar tutorial, with a maths basis, is this one I wrote for ESPs:
troll.comuv.com/sraeG.html**
Concepts are the same, just for a different outcome. Luckily someone mirrored that one though.
Simply, programming isn't an issue. You can tell from my first tutorial that my programming wasn't/isn't great. It's about your understanding of what you're trying to achieve, which is (as stated above), simple trig. Get that sorted in your mind first, then look at learning the specific code for it. Even on here, or other forums, if you tell people exactly what you are needing, most will even help you or post a full slab of code for you... But they won't think AND code for you...