I have a scrolling background in my application with a character moving along it. The character travels at fast speeds, so I need the ground to be very long, so I made it 10,000 pixels long. I have a function to move the camera when my character moves :
code local function moveCamera()
if (rider.x > 80 and rider.x < 10000) then
game.x = -rider.x + 80
end
end
Runtime:addEventListener( “enterFrame”, moveCamera ) [/code]
and here is the ground:
local ground = display.newImage("snowySetting.png", 0, 0, true)
game:insert(ground)
ground.y = 307
ground:rotate(180)
physics.addBody(ground, "static", {bounce = .5, friction = 0.02})
When I run the app on the simulator, the ground seems to cut off at about 1000 or so pixels. Is there a limit to how big an object can be? [import]uid: 7116 topic_id: 6076 reply_id: 306076[/import]
[import]uid: 7116 topic_id: 6076 reply_id: 20950[/import]