Description
The collider that was hit by the controller
function OnControllerColliderHit(hit : ControllerColliderHit) {
hit.collider.renderer.material.color =
Color.red;
}
using UnityEngine;
using System.Collections;
public class example :
MonoBehaviour {
void OnControllerColliderHit(ControllerColliderHit hit) {
hit.collider.renderer.material.color =
Color.red;
}
}
import UnityEngine
import System.Collections
class example(
MonoBehaviour):
def
OnControllerColliderHit(hit as ControllerColliderHit):
hit.collider.renderer.material.color =
Color.red