If I create a GO scene with a falling cube belonging to layer "Players" and set Exclude Layers to "Players" on the mesh of the plane then the cube falls through the plane as expected.
If I create the same scene but in ECS the layers settings have no effect and the cube collides with the plane even though it should not.
Yes yes, I know that I could/should? go for PhysicsShape (and use the Collision Filter here) and PhysicsBody instead of RigidBody and Colliders for Physics in ECS 🙂
This is not really desirable though for the following reasons:
- I read between the lines from various ok recent forum posts that the reason why PhysicsShape and PhysicsBody have been moved to the Samples section of Unity Physics package is that they are targeted to be deprecated? (Is this correctly understood?)
- I would really prefer not to include Samples project code in our production codebase.
What is the recommended approach as of October 2023?
Should I go with the Samples code PhysicsBody and PhysicsShape until further notice or is there an alternative way of leveraging layers in and ECS world still using RigidBody and "normal" colliders?