{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method SetCollisionFilter | Unity Physics | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    CollisionFilter filter

    Specifies the filter.

    Implements
    ICollider.SetCollisionFilter(CollisionFilter)

    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 RefreshCollisionFilter(), and should be used in cases of updating multiple child colliders at once, where you will need to call RefreshCollisionFilter() manually after the last child filter is updated.

    Declaration
    public void SetCollisionFilter(CollisionFilter filter, ColliderKey childKey, bool refreshCompoundFilter)
    Parameters
    Type Name Description
    CollisionFilter filter

    Specifies the filter.

    ColliderKey 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 RefreshCollisionFilter() to update the root filter based on the new child filter value.

    Declaration
    public void SetCollisionFilter(CollisionFilter filter, ColliderKey colliderKey)
    Parameters
    Type Name Description
    CollisionFilter filter

    Specifies the filter.

    ColliderKey colliderKey

    The collider key.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)