[Bug Report on Unity.Physics] CollisionFilter Setting of PhysicsShape

I’ve struggle with this 2 days…
and finally figured out that there is miss naming with ‘PhysicsShape’ Script. In CollisionFilter part.



I’ve set PointDistanceInput’s CollisionFilter : Belong(maskbit) : enemy(1<<1) ,
Collidewith(Categorybit): player(1<<0)
And Get Hit, then get Hit’s Collision Filter inform.
Finally I found that ‘PhysicsShape > CollisionFilter’ and are changed each other.

Actually I think you have that reversed?

The code docs state:

// A bit mask describing which layers this object belongs to.
public uint CategoryBits; // TODO rename?

// A bit mask describing which layers this object can collide with.
public uint MaskBits; // TODO rename?

Yeah. That is weird point for me too. But in the Manual.
https://docs.unity3d.com/Packages/com.unity.physics@0.0/manual/collision_queries.html
4448713--407785--upload_2019-4-20_0-54-45.png

You can See MaskBits is “Belongs”.

Package comment makes sense better. And idk why i couldn’t think about looking into package…i’m…fool…

ps. plz edit that doc page inform.

Yeah those official docs are clearly wrong :slight_smile:

Dammmmmn… that must have been so frustrating!