Serialized CollisionFilter in inspector

Hello,

I am doing some physics tests and it would be nice to be able to set the collision filter settings on the component author in the inspector.

Any way to get something similar to the physics shape component?

Thanks,

yep like

[SerializeField] private PhysicsCategoryTags rigidBelongsTo;
[SerializeField] private PhysicsCategoryTags rigidCollidesWith;

var filter = CollisionFilter.Default;
filter.BelongsTo    = rigidBelongsTo.Value;
filter.CollidesWith = rigidCollidesWith.Value;
6 Likes

Well that’s simple enough! Thanks!