calculate angle between two positions unity code example
Example: get angle between two vectors unity
Vector3 targetDir = target.position - transform.position;
float angle = Vector3.Angle(targetDir, transform.forward);
Vector3 targetDir = target.position - transform.position;
float angle = Vector3.Angle(targetDir, transform.forward);