So, what I want to do is to add a script where you press (hold) the left control key, and the capsule collider on the player shrinks (the height shrinks), as well as the center of the capsule collider changes to a different y coordinate.
I figured it out (this is my script, at least):
.
var capCol: CapsuleCollider;
capCol = gameObject.GetComponent(“CapsuleCollider”);
.
function Update () {
if (Input.GetButton("Crouch")) {
capCol.height = 0.9f;
capCol.center.y = 0.3f;
}
else {
capCol.height = 1.0f;
capCol.center.y = 0.28f;
}
}