Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Collide with all, not surposed to

$
0
0
I got this code

Code (JavaScript):
  1. #pragma strict
  2. static var Won : boolean = false;
  3. function Start () {
  4.  
  5. }
  6.  
  7. function OnCollisionEnter2D( Collision2D )
  8.     {
  9.         if(gameObject.tag == "Goal")
  10.             {
  11.                 Won = true;
  12.                 Movement.CannonPower = 1000;
  13.             }
  14.    
  15.     }
  16.  
  17.  
  18.  
  19.  
  20. function Update () {
  21.  
  22. }
And its activate the collide function even though the object there is colliding aint have the tag "Goal"

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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