var filter = new CollisionFilter { BelongsTo = (uint)Layer.Actor, CollidesWith = (1u << Layer.Actor), GroupIndex = 0 };
Layer.Actor is an integer of 2.
My template for actors is set up like this:

So why is it raycasting is always failing against the actor? In Physx the above always works. Perhaps I’m just confused by the obvious or don’t understand how DOTS Physics is thinking.

https://docs.unity3d.com/Packages/com.unity.physics@0.50/manual/collision_queries.html#filtering
Has the exact formula for filtering
BelongsTo = (uint)Layer.Actor
Pretty sure that’s your issue, think it should also be 1 << Layer.Actor
1 Like
Duh.gif! I honestly wonder sometimes as I’d read that several times but then for some reason dismissed it - probably it was the template wrong. Coming back to it, works fine! Thanks for clearing it up.