// Use this for initialization void Awake () { playerGravity = gameObject.GetComponent<GravityTest>(); thisRigidbody = GetComponent<Rigidbody>(); colliderHeight = GetComponent<CapsuleCollider>().height * transform.localScale.y; colliderRadius = GetComponent<CapsuleCollider>().radius * transform.localScale.x; }
void Awake() { playerTransform = transform.parent; playerGravity = playerTransform.GetComponent<GravityTest>(); //Hide the mouse and lock it to the screen Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; //the player is not currently flipping flipping = false; pPositiveY = false; }