var post = Camera.main.ScreenToWorldPoint(Input.mousePosition);
gameObject.GetComponent<SpriteRenderer>().flipX = transform.position.x < post.x;
var w_mp = Camera.main.ScreenToWorldPoint(Input.mousePosition);
if(transform.position.x < w_mp.x)
{
gameObject.transform.rotation = Quaternion.Euler(0, 180, 0);
}
else
{
gameObject.transform.rotation = Quaternion.Euler(0, 0, 0);
}