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

Physics.IgnoreCollision between rigidebody2d+polygone collider 2d and edge collider 2d doesn't work?

$
0
0
Hi, I'm new at Unity. And I try to ignore collision between my gamer(rigidebody+polygone collider 2d) and a simple edge collider 2d. I've try to put this code in my gamer and the bullet is the edge collider. I've try in the other side too but it's doesn't work... do you know what I've doing wrong? public class ExampleClass : MonoBehaviour { public Transform bulletPrefab; void Start() { Transform bullet = Instantiate(bulletPrefab) as Transform; Physics.IgnoreCollision(bullet.GetComponent(), GetComponent()); } }

Viewing all articles
Browse latest Browse all 148