Version: 2022.3
public characterController controller ;

描述

撞击该碰撞体的控制器。

using UnityEngine;

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