- Home /
Question by
Shine_Bolt · Feb 22, 2019 at 10:30 AM ·
filtercontact
How is the default value of ContactFilter2D.isFiltering true?
I have a static ContactFilter2D like so
protected static ContactFilter2D contact_filter;
protected float self_destruct_timer;
protected Vector3 direction;
private float xward;
protected virtual void Start ()
{ phys.velocity = transform.right * speed * xward;
self_destruct_timer = Time.time + life_time;
if (!contact_filter.isFiltering) contact_filter.layerMask = Public_Const.Solid;
contact_filter.useLayerMask = true;
...
}
The whole point of checking to see if isFilter is true is to check to see if the contact filter has already been initialized, so why won't it work?
Comment
Your answer
