public Vector3 center ;

Description

该角色的胶囊体中心(相对于变换组件的位置)。

using UnityEngine;

public class Example : MonoBehaviour { CharacterController controller; private void Start() { controller = GetComponent<CharacterController>(); controller.center = new Vector3(0, 1, 0); } }