Quantcast
Channel: Questions in topic: "ignorecollision"
Viewing all articles
Browse latest Browse all 148

No errors console but Physics2D.IgnoreCollision does not work

$
0
0
Hi, I have no errors on my console but it doesn't ignore collision... I don't understand why. There is my code: public class gamer : MonoBehaviour { Rigidbody2D body; public Transform bulletPrefab; void Start () { Transform bullet = Instantiate(bulletPrefab) as Transform; Physics2D.IgnoreCollision(bullet.GetComponent(), GetComponent()); body = GetComponent(); } } Any help will be welcome :))) Thanks

Viewing all articles
Browse latest Browse all 148

Trending Articles



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