Why object pass through a line which is a static physics object

See the below code the objects actually pass through the line which is a static physics object. on the left side of the line the objects bounces but on the right side it just passes through. whats happening here ? any idea ?

[lua]local gameGroup = display.newGroup()
local physics = require(“physics”)
physics.start()

function newObject()
local rand = math.random( 110 )
obj = display.newText(rand,0,0,nil,20)
obj.x = 10 + math.random( 200 )
obj.y = -100
physics.addBody( obj, { density=0.5, friction=0.3, bounce=0} )
end
local dropobjects = timer.performWithDelay( 1000, newObject, 100 )

local groundLine = display.newLine(10, 300, 320, 300)
groundLine.width = 5
groundLine:setColor( 255, 0, 0)
physics.addBody( groundLine, “static”) [/lua]
[import]uid: 71210 topic_id: 13330 reply_id: 313330[/import]

put this line in your code

physics.setDrawMode(“hybrid”) after physics.start()

and you can find out why that is happening recommendation use newRect instead of newLine [import]uid: 12482 topic_id: 13330 reply_id: 48957[/import]

thanks for your reply. but its very strange. do you have any idea why its happening ? [import]uid: 71210 topic_id: 13330 reply_id: 48958[/import]

honestly no idea i think it’s a bug [import]uid: 12482 topic_id: 13330 reply_id: 48960[/import]

Has this bug been reported?

I have a few small “static” objects and several bigger “dynamic” objects. Dynamic objects’ bullet property is set to false. When dynamic objects hit static objects hard, dynamic objects bounce off. That’s how it’s meant to work – and all is good.

However, when dynamic objects move slowly toward the static objects, they pass through the static objects as if the static objects aren’t there.

I’ve seen a post about fast moving objects passing through static objects, but in my case, it’s the complete opposite. Fast moving dynamic objects always bounce off the static objects no problem – it’s the slow moving objects that are behaving strangely.

I’d be so grateful to hear about any work-around if there are any.

[import]uid: 67217 topic_id: 13330 reply_id: 54077[/import]

Looking through forum, I came across a suggestion to check this out:

http://blog.anscamobile.com/2011/08/solutions-to-common-physics-challenges/

And… inserting this at the top of the module helps a great deal: physics.setVelocityIterations( 6 )

Awesome things – thank you for the blog post, Jon!
[import]uid: 67217 topic_id: 13330 reply_id: 54086[/import]