Point on a triangle.
I have a triangle(part of a mesh) that is created from vertex and a green point which should be snapped to that mesh(pink triangle). The main problem is that I know only X and Z of a green point. And mesh can't have colliders on it. How can I find Y of that green point?
P.S. Triangles vertex can have different positions. Green point also can move according to X and Z. 2 attachments: Top view and side view.
screenshot-3.png
(118.8 kB)
screenshot-2.png
(27.4 kB)
Comment
Answer by k_bit · Mar 30, 2021 at 07:21 AM
The question is, how to get Vectors (GreenPoint GP) Y position on the polygon's surface that consist of 3 vertices. We know all 3 vertex positions and Vectors(GP) X and Z coordinates. The idea is to make that Vector (GP) snap to the grid when GP changes X and Z position.