/*if(hanging && Input.GetKey("s")) * { * gravity.UnFreezeGravity(); * hanging = false; * rigidbody.freezeRotation = false; * rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ; * }*/ private void OnTriggerStay(Collider other) { if (!hanging && jump.grounded && Input.GetKey("e")) { hanging = true; ledge.HoldLedge(other.transform); colStorage = other; } }