public float zn;
public float zn1;
public int camzn;
public bool presed;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKey (KeyCode.LeftControl)) {
presed = true;
}else{
presed = false;
}
if (presed == true) {
gameObject.GetComponent <CharacterController> ().height = zn;
} else {
if (Physics.Raycast (transform.position + transform.up, transform.up, 1f)) {
} else {
gameObject.GetComponent <CharacterController> ().height = zn1;
}
}
}