Im trying to tell Unity that im the character collides with a certain area then it should disable the character controller. But i cant seem to disable the Compnenet or the Script.... PLEASE HELP
private var Controller: PlayerControls;
function OnCollisionEnter2D (collider : Collider) {
if (collider.gameObject.tag == "GoalFieldR") {
Controller.enabled = false;
}
}
↧