Instantiate at angle between two points


Iv found similar types of posts but they always seem to show how to get an angle between two vectors rather than a quaternion. If I have point A and point B how do I

Instantiate(gameObjectPrefab, destination, quaternion angle between point A and point B)?

Any thoughts or pointing me in the right direction would be awesome.



komodor pointed you right, but if you’re having problems:

Vector3 pointBetween = Vector3.Lerp(pointA, pointB, 0.5f); // 0.5f means exactly in the middle
Vector3 direction = pointBetween - destination;
Instantiate(gameObjectPrefab, destination, Quaternion.LookRotation(direction));