Version: 2021.1
public characterController controller ;

描述

撞击该碰撞体的控制器。

using UnityEngine;

public class Example : MonoBehaviour { //Disable collision detection on CharacterControllers we touch. void OnControllerColliderHit(ControllerColliderHit hit) { hit.controller.detectCollisions = false; } }