Version: 2020.2
public float slopeLimit ;

描述

这些角色控制器的坡度限制(单位为度)。

using UnityEngine;

public class Example : MonoBehaviour { // Set the controller slope limit to 45 degrees CharacterController controller;

void Start() { controller = GetComponent<CharacterController>(); controller.slopeLimit = 45.0f; } }