Hello,
I'm trying to find the angle (difference) between a sphere's center and it's surface from an external position.
Math is not my strongest skill, and I'm much better reading code than formula. If you can write the solution in code form, my brain will thank you.
The reason I'm trying to calculate this is for a melee attack scan. The attacker scans for targets within a certain radius and angle of the attack origin. But I want to subtract each potential target's size (radius) from the angle test, so larger targets are easier to hit. So currently I just have the direction vector and distance from the attacker and Target origin. I would like to find the angle I need to reduce the angle requirements to be hit.
Thanks for any advice!