Hi,

I’ve been working with Unity for a few months, but now I’m stuck - beginners Unity books don’t include math primers ;)… I would like to know how to find a Vector3 position (p1) within a triangle in 3D space and I also need to know the distance from a point (p0) to the new point (p1). The new Vector3 needs to be created from a right angle between the triangle and p0 (perpendicular to the triangle). I’d also rather avoid RayCasting as I think that would be overkill and this operation needs to happen often. Note: There is 100% certainty that p0 is perpendicular to the triangle’s underside.

I’m guessing the solution involves using the Vector3.Distance function at the end, but first calculating angles between some of the original vectors - which I can do using this but then I’m clueless. I’ve attached a picture of what I am trying to achieve.

Description and example code snippet would be much appreciated. Natural English explanation is preferable as my Greek is terrible. Alternatively (I’ve read asking for code is bad…?) if there’s a link to a similar post, or simply a broken down list of things I need to do, where I can search more informed, then that would be great, but I have searched on several math sites, programming sites and unity without any luck - I’ve been googling for hours made worse as I’m not sure what I’m looking for ANY Help would be much appreciated, please.

PS - my first post, so if I’ve broken protocol somehow, please let me know. Thanks