Collision filter is driving me nuts!

I’m trying to create some walls and some other objects that will bounce off the walls but not off each other. I thought this would be easy. But it never seems too work for me.

I have a set of walls and another set of ball objects. Balls should collide with walls, but not with other balls. This is what i have been using, but it doesn’t seem to work.

local wall_collision = { categoryBits = 1, maskBits = 2 }
local ball_collsion = { categoryBits = 2, maskBits = 1 }

What I am I missing? Seems that walls have the Category of 1 and they should collide with Category 2. Balls have Category 2 and should only collide with Category 1 [import]uid: 98652 topic_id: 24911 reply_id: 324911[/import]

I believe this very detailed blog post may hep you with understanding this; http://developer.anscamobile.com/forum/2010/10/25/collision-filters-helper-chart

Let me know how that goes :slight_smile: [import]uid: 52491 topic_id: 24911 reply_id: 101198[/import]

I am pleased to see that my old collision filter posting is still helping new Corona devs understand the process. I never expected it to gain such ground and even spawn great tools based off it. Thank you all for linking to it, re-posting it, and using its methods in your own apps. I am proud that it has proven useful to many developers.

Brent Sorrentino
Ignis Design [import]uid: 9747 topic_id: 24911 reply_id: 101211[/import]

I’m glad, it’s a very useful post indeed and exceptionally detailed :slight_smile: [import]uid: 52491 topic_id: 24911 reply_id: 101234[/import]