basaranb
2/11/2019 - 11:32 AM

Look Towards TARGET

float speed = 100f, angle; 

float step = speed * Time.deltaTime; 

Vector2 direction = TARGET.position - transform.position; 

angle = Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg; 

transform.rotation = Quaternion.Euler(new Vector3(0, 0, angle));