using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SightWobble : MonoBehaviour
{

    public float wobbleHz = 1.2f;
    public float scaleAmount = 0.1f;

    public Vector3 origScale;

    void Start()
    {
        origScale = transform.localScale;
    }

    void Update()
    {
        float wobbleScale = Mathf.Sin(Time.time * wobbleHz * 2* Mathf.PI) * scaleAmount + 1;
        transform.localScale = origScale * wobbleScale;
    }
}
