@Wayfaerer wrote:
Hi guys,
I'm trying to update my project to 3.12 and I am unable to filter the collisions using chipmunk. I'm having trouble with cpShapeFilter. How can I add several category masks like explained in the table in: https://chipmunk-physics.net/release/ChipmunkLatest-Docs/#cpShape-Filtering?
For example I want to have a player that collides with the platforms, items and obstacles, I tried the following and does not work:
playerShape->filter = cpShapeFilter{ , Common::playerCategory, (Common::platformCategory, Common::itemCategory, Common::obstacleCategory) }; platformShape->filter = cpShapeFilter{ 0, Common::platformCategory, Common::playerCategory };
Can someone give an example of how to do this?
Thank you very much.
Posts: 2
Participants: 1