That worked beautifully! Thanks Jon!
-Matt
W2MD
Here’s my test code in case anyone else can benefit from it. I just added the three images I was putting together into the “Hello Physics” project.
[lua]local physics = require( “physics” )
physics.start()
local sky = display.newImage( “bkg_clouds.png” )
sky.x = 160; sky.y = 195
local ground = display.newImage( “ground.png” )
ground.x = 160; ground.y = 445
physics.addBody( ground, “static”, { friction=0.5, bounce=0.3 } )
local num = 100 --this is the width of the middle
local Left = display.newImageRect( “Left.png”,121,187 )
Left.x = -num*0.5 - Left.width*0.5 ; Left.y = 0
local Middle = {}
for i = 1, num do
Middle[i] = display.newImageRect( “Middle.png” ,1,184)
Middle[i].x = num*0.5 - i; Middle[i].y = 2
end
local Right = display.newImageRect( “Right.png”,107,186 )
Right.x = num*0.5 + Right.width*0.5 -0.5; Right.y = 0;
local group = display.newGroup()
group:insert(Left)
for i = 1, num do
group:insert(Middle[i])
end
group:insert(Right)
group.x, group.y = 200, 200
physics.addBody( group, { density=3.0, friction=0.5, bounce=0.3 } )[/lua] [import]uid: 10211 topic_id: 15979 reply_id: 59351[/import]