I am having a problem with physics bodies that exist in groups. I have a group (game) that acts as a camera. This group contains an object (treeTop). During runtime, the display object renders correctly, but the physics body acts as if it isn’t in the group. Worse yet, when I set the physics draw mode to debug, it shows the rendered display object as the physics object. The physics object still exists invisibly above the rendered display object. Whats going on? - Steven
[code]
local game = display.newGroup();
game.x = 0
local background = display.newImage( “images/Background2Stage.png”, true )
background.y=0
game:insert( background )
local treeTop = display.newImage( game, “images/TreeTop.png” )
physics.addBody( treeTop, “static”, {bounce = 0.2, friction = 1.0} )
treeTop.y=300
local function moveCamera()
if( game.y < game.height - display.contentHeight ) then
game.y = game.height - display.contentHeight - eek.y - eek.height
end
end
Runtime:addEventListener( “enterFrame”, moveCamera )[/code] [import]uid: 60927 topic_id: 10105 reply_id: 310105[/import]