I have the ground in my game lifted about 30 pixles from the bottom of the screen, with a the player on top of it. This woks fine on the original simulator, but not on any of the other ones. Sometimes the ground is takes up over half the screen? I have not clue how tot fix this.
My code:
[lua]
local ground2 = display.newImage(“game_ground.png”)
ground2.y = display.contentHeight
ground2.x = ground2.x -5
physics.addBody(ground2, “static”, { } )
group:insert(ground2)
player = display.newImage(“game_player.png”)
player.x = display.contentWidth - 25
player.y = ground.y - 60
player:scale(.7,.7)
physics.addBody(player, “static”, { radius = 10 } )
player.collision = playerCollision
player:addEventListener(“collision”, player)
group:insert(player)
[/lua]
and here is my config.lua if it matters:
[lua]
local aspectRatio = display.pixelHeight / display.pixelWidth
application =
{
content =
{
graphicsCompatibility = 1, – Enable V1 Compatibility mode
width = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),
height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),
scale = “letterbox”,
fps = 30,
antialias = false,
xalign = “center”,
yalign = “center”,
imageSuffix =
{
["@2"] = 2
}
}
}
[/lua]
Thank you.