I'm having a really annoying problem in Unity where Input.GetMouseButton(0), in both the Update() and Fire() functions, won't call when I am moving my player around the screen. If the player is stationary and I hold the mouse down, it returns true and any code I have afterwards is called.

If I fire while stationary and then start moving while continuing to fire, I won't stop firing or be unable to move.

I also tried using `if (Input.GetAxis("Fire1") !=0)` instead but there was no change.

```
void Update()  
{  
    if (Input.GetMouseButton(0))  
        Debug.Log("Mouse Pressed");  // Not called when player is moving

    mouseScreenPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);

    Fire(m_gunType);

    PerformRotation();

    PerformMovement();
}

private void PerformMovement()
{
    if (Input.GetKey(KeyCode.W))
        m_rb.AddForce(new Vector2(0, m_speed * Time.deltaTime));
    if (Input.GetKey(KeyCode.A))
        m_rb.AddForce(new Vector2(-m_speed * Time.deltaTime, 0));
    if (Input.GetKey(KeyCode.S))
        m_rb.AddForce(new Vector2(0, -m_speed * Time.deltaTime));
    if (Input.GetKey(KeyCode.D))
        m_rb.AddForce(new Vector2(m_speed * Time.deltaTime, 0));
}

private void Fire(GunType gt)
{
    Debug.Log("Fire called"); // Called every frame

    if (Input.GetMouseButton(0))
    {
        Debug.Log("Fired"); // Only called when player is stationary

        // Spawn bullet code
    }
}

private void PerformRotation()
{
    // if m_firePointOffset if changed in the inspector
    if (m_firePoint.localPosition != (Vector3)m_firePointOffset)
        m_firePoint.localPosition = (Vector3)m_firePointOffset;

    // Get Angle in Radians
    float AngleRad = Mathf.Atan2(mouseScreenPosition.y - transform.position.y, mouseScreenPosition.x - transform.position.x);
    // Get Angle in Degrees
    float AngleDeg = (180 / Mathf.PI) * AngleRad;
    // Rotate Object
    this.transform.rotation = Quaternion.Euler(0, 0, AngleDeg);
}

```