Quantcast
Channel: Questions in topic: "tagging"
Viewing all articles
Browse latest Browse all 120

Raycast isn't working when with tag

$
0
0
If I add "&& Hit.collider.tag" part to my function it wouldn't work, I check if the object desired is properly tagged and it was. void Raycast() { RaycastHit2D Hit = Physics2D.Raycast (transform.position, Vector2.down ); if (Hit.distance < 0.9f && Hit.collider.tag == "ground") { Debug.Log("dd"); } }

Viewing all articles
Browse latest Browse all 120

Trending Articles



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