Hi all. I want to get forward direction (Vector3) of face, that I hitted by Raycast. Like transform.forward but not forward of transform but forward of face (or tris). I’m using C#.
If you need additional info, please ask.
EDIT2: What I mean by ‘face forward’. Ex.: When You select Transform on scene (and have axis selected on ‘Local’), You see blue arrow indicating Z axis - object forward. I need the same but for face.
EDIT1: Here is some code, hope that will give you better look at what i need.
RaycastHit hit;
Ray ray;
Transform t;
void Update()
{
if(Input[...])
{
if(Physics.Raycast(ray, out hit, 100))
{
clone = Intantiate(t, hit.point, Quaternion.identity)
clone.LookAt(HERE I NEED FORWARD DIRECTION OF FACE);
}
}
}
Thanks in advance,
Paul