Method SetCollisionFilter
SetCollisionFilter(CollisionFilter)
Sets the root collision filter. This also sets the filter of all children to the input value.
Declaration
public void SetCollisionFilter(CollisionFilter filter)
Parameters
Type | Name | Description |
---|---|---|
Collision |
filter | Specifies the filter. |
Implements
SetCollisionFilter(CollisionFilter, ColliderKey, bool)
Sets collision filter of the child specified by collider key. If the provided key is empty,
it will set the root filter and the filter of all children to the provided value. If the
filter is invalid, it will throw an exception. If refreshCompoundFilter is set to false, this
function will not call Refresh
Declaration
public void SetCollisionFilter(CollisionFilter filter, ColliderKey childKey, bool refreshCompoundFilter)
Parameters
Type | Name | Description |
---|---|---|
Collision |
filter | Specifies the filter. |
Collider |
childKey | The child key. |
bool | refreshCompoundFilter | True to refresh compound filter. |
SetCollisionFilter(CollisionFilter, ColliderKey)
Sets collision filter of the child specified by collider key. If the provided key is empty,
it will set the root filter and the filter of all children to the provided value. If the
filter is invalid, it will throw an exception.
After setting the child filter, this function will also call Refresh
Declaration
public void SetCollisionFilter(CollisionFilter filter, ColliderKey colliderKey)
Parameters
Type | Name | Description |
---|---|---|
Collision |
filter | Specifies the filter. |
Collider |
colliderKey | The collider key. |