PlayerController.SetHeight()

public void Player.PlayerController.SetHeight(Vector3 vec)

CyberPsychosis    >    Player    >    PlayerController    >    SetHeight

Summary

Sets the target height of the character, will lerp to this height smoothly.

Example

using UnityEngine;
using Player;

public class Crouching : MonoBehaviour
{
    public PlayerController player;
    public float crouchHeight = 0.8f;

    void Update()
    {
        if(Input.GetKeyDown(KeyCode.LeftControl))
            player.SetHeight(crouchHeight);

        if(Input.GetKeyUp(KeyCode.LeftControl))
            player.ResetHeight();
    }
}