// Use this for initialization void Start() { originalLocalPos = head.localPosition; character = GetComponent<FPH_PlayerController>(); if(GetComponent<AudioSource>() == null && !handBob){ // we automatically add an audiosource, if one has not been manually added. // (if you want to control the rolloff or other audio settings, add an audiosource manually) gameObject.AddComponent<AudioSource>(); } prevPosition = GetComponent<Rigidbody>().position; }