wrong contentBounds ?

physics =require "physics" physics.setDrawMode( "hybrid" ) physics.start() c1 = display.newCircle( 100,100,50 ) physics.addBody( c1,{radius=50, friction=1}) r1 = display.newRect(200,300,500,20) r1.rotation = 10 physics.addBody( r1, "static") r2 = display.newRect(700,300,500,20) r2.rotation = -10 physics.addBody( r2, "static") timer.performWithDelay( 1, function() display.remove(visvis) visvis = display.newLine(0, c1.contentBounds.yMin, 1000, c1.contentBounds.yMin ) end, 0 )

Why does the line bounce off the circle?

Hi @pahuchiy,

I’m not sure why but using c1.y - c1.path.radius instead of c1.contentBounds.yMin give me better results.

Try

local visvis = display.newLine(0, c1.contentBounds.yMin, 1000, c1.contentBounds.yMin ) timer.performWithDelay( 20, function() visvis.y = c1.y - c1.path.radius end, 0 )

I created only one line object. 

Have a nice day:)

ldurniat 

I realized. Because the borders are always rectangular