Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Trying to Disable Compenent when there's a collsion

$
0
0
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; } }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>