Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

ControllerColliderHit.controller

public characterController controller;

Description

The controller that hit the collider.

using UnityEngine;

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

Did you find this page useful? Please give it a rating: