Hi,
I need to draw a regular GameObject, like a capsule between two moving 3d points. I’ve try
.LookAt() with Lerp() for positioning, but the problem is that my object need to look at both points at the same time. I really need this two work with object and not lineRenderer, it already work that way. For now what I have is :
Vector3 vdir = getVdirection(Point1,Point2);
GameObj.transform.position = Vector3.Lerp (Point1.transform.position,Point2.transform.position, 0.5f);
GameObj.transform.LookAt (Vector3.one, vdir );
Vector3 getVdirection(GameObject A, GameObject B)
{
return (A.transform.position - B.transform.position).normalized;
}
This doesn’t do what i want because the object is not facing the two point with both of his ends.
Any help?