Hello there!
I have already changed the rotation of my arrow, but on another topic, Nina mentioned “SpriteRenderer.flipX” how can I use this? I have already searched on google but I have no clue about it
void OnFire(InputValue value)
{
if(!isAlive) { return; }
if(value.isPressed)
{
myAnimator.SetTrigger("Shoot");
if(myRigidbody.transform.localScale.x == 1)
{
Debug.Log("Right");
Instantiate(bullet, gun.position, transform.rotation);
}
else{
Debug.Log("Left");
Instantiate(bullet, gun.position, Quaternion.Euler(0f, 180f, 0f));
}
}
}