I recently asked a question here: How would I check the range against the entirety of an enemy object, and not just it's transform.position?
That was accurately answered, and works perfectly fine. However, now I need to find the distance from the center of a non-rectangular object to it's edge as illustrated here:
I have the length of Side A
, and the angle between Side A
and Side C
, as well as the angle between Side A
and Side B
. I am missing a couple things:
- The length of
Side B
- The length of
Side C
My end goal is to get the length of side C
. It is important to note that my math skills are barely comparable to first year college algebra. I heavily rely on the methods provided within Unity to calculate dot products, angles, and distances without much understanding of their inner workings.
How would I go about accomplishing this?
(180 - (60 + angleAC))
. And once you know 1 side and its opposite angle, you can use the law of sines to find the others. You can also use the law of cosines in many convenient cases. \$\endgroup\$