// Use this for initialization void Start() { if (Character == null) { Character = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameRules>().Players [0]; } }
// Use this for initialization public void Start() { vCurr = new Vector3(0, 0, 0); vPrev = new Vector3(0, 0, 0); pPrev = transform.position; skinWidth = 0.01f; body = GetComponent <Rigidbody>(); col = GetComponent <Collider>(); minExtent = Mathf.Min(Mathf.Min(col.bounds.extents.x, col.bounds.extents.y), col.bounds.extents.z); partExtent = minExtent * (1.0f - skinWidth); sqrMinExtent = minExtent * minExtent; // (makes for faster calculations later) character = GetComponentInParent <StuffingStatus> (); }