Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Multipple staticGeomFilter.CollidesWith

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

  1. kro11


    Sep 23, 2019
    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


    Mar 19, 2019
    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.