Bounce

Hi,

I have all my display objects set with a bounce of 0, including my scene boundries but for some reason my display objects still on occasion bounce. What can I do to get rid of bounce completely? [import]uid: 31694 topic_id: 23966 reply_id: 323966[/import]

Can you please provide some of your code… that way it is easier for us to help you :slight_smile:

Best regards
Se460 [import]uid: 122802 topic_id: 23966 reply_id: 96593[/import]

My boundaries:

--Create boundaries  
local ceiling = display.newRect(0,0,\_W,5);  
ceiling.y = 0 - ceiling.height;  
ceiling.type = "wall";  
  
  
local ground = display.newRect(0,0,\_W,30);  
ground.y = \_H - ground.height;  
ground.type = "floor";  
  
local left\_wall = display.newRect(0,0,6,\_H);  
left\_wall.x = 0 - left\_wall.width \* 0.5;  
left\_wall.type = "wall";  
  
local right\_wall = display.newRect(0,0,6,\_H);  
right\_wall.x = \_W + right\_wall.width \* 0.5;  
right\_wall.type = "wall";  
  
--Add physics bodies  
physics.addBody(ceiling, "static");  
ceiling.isSensor = true;  
physics.addBody(ground, "static", {density=100, friction=10, bounce=0});  
physics.addBody(left\_wall, "static", {density=100, friction=10, bounce=0});  
physics.addBody(right\_wall, "static", {density=100, friction=10, bounce=0});  

My display object:

local bean = display.newImage("images/"..colour..".png");  
bean.x = display.contentWidth\*0.5; bean.y = -100;  
  
local left = { -7,-4, 12,24, -5,29, -21,30, -33,25, -40,18, -41,7, -34,1 };  
local right = { -8,-7, 4,-20, 16,-32, 28,-30, 35,-20, 34,-2, 27,11, 11,22 };  
physics.addBody( bean, "dynamic",  
 { density=100, friction=50, bounce=0, shape=left},   
 { density=100, friction=50, bounce=0, shape=right}  
 )  

When the display objects hit the floor they often bounce as when they hit each other. [import]uid: 31694 topic_id: 23966 reply_id: 96626[/import]

Bump [import]uid: 31694 topic_id: 23966 reply_id: 96949[/import]

Is it maybe something to do with friction? Under what conditions is the bean bouncing?

Dan [import]uid: 67933 topic_id: 23966 reply_id: 96950[/import]

Seems to depend on which side of the object it lands. [import]uid: 31694 topic_id: 23966 reply_id: 96957[/import]