Version: 2020.2
public float stepOffset ;

描述

这些角色控制器的台阶偏移量(单位为米)。

注意:请参阅手册页 Character Controller 组件, 其中详细描述了 stepOffset

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public CharacterController controller;

void Example() { controller = GetComponent<CharacterController>(); controller.stepOffset = 2.0F; } }