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
↧