Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Multipple staticGeomFilter.CollidesWith

Discussion in 'Physics for ECS' started by kro11, Feb 4, 2020.

  1. kro11

    kro11

    Joined:
    Sep 23, 2019
    Posts:
    103
    I tried to summarize 2 masks, but then no one works at all. Any ideas?

    Code (CSharp):
    1. uint x1= 1 << 0;
    2. uint x2= 1 << 29;
    3. staticGeomFilter.CollidesWith = x1+x2;
     
  2. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    Should you be using bitwise OR rather than the add operator?

    staticGeomFilter.CollidesWith = x1 | x2;


    The ragdoll demo code does this sort of thing when disabling collisions between different joints.
     
    kro11 likes this.