Collision filtering causes physics objects to behave differently

I’m using collision filtering between my player object, and the floor of my world.  Normally when the player falls onto the floor there would be a bounce.  After I use collision filtering, my player falls onto the floor but doesnt bounce anymore.  there also doesnt seem to be any more friction.  What’s up with that?  Why the change in behavior?

 bottom = display.newRect(world, 0, screenH - 2, screenW, 2 ) bottom.anchorX, bottom.anchorY = 0,0 bottom:setFillColor( 0,1,0 ) physics.addBody( bottom, 'static', {filter={ categoryBits=2, maskBits=1 }} ) -- create player player = require("player").new(world) player.x, player.y = 100, 100 sceneGroup:insert( world ) physics.addBody( player, 'dynamic', {friction = 1.0, density = 10.0, bounce = 0.0, filter={ categoryBits=1, maskBits=2 }} ) player.isFixedRotation = true 

Additionally, how could i have an object pass through another (not collide) but detect the collision?  should i be using the pre collision event handler to nullify the contact?

Hey, So 

Question 1 - Try adding bounce to your “bottom” object.

Question 2 - To make an object passs through another but still detect collision you need to set 

player.isSensor = true

Good Luck!

thanks for the help.  it does work adding bounce to my bottom object.  but can you explain why the original collision acts differently before and after filtering?  As I get answers to my questions I’m trying to learn why corona behaves the way it does :slight_smile:

Hey, So 

Question 1 - Try adding bounce to your “bottom” object.

Question 2 - To make an object passs through another but still detect collision you need to set 

player.isSensor = true

Good Luck!

thanks for the help.  it does work adding bounce to my bottom object.  but can you explain why the original collision acts differently before and after filtering?  As I get answers to my questions I’m trying to learn why corona behaves the way it does :slight_smile: