Thanks Brent.
I’m using this suggested config.lua
–calculate the aspect ratio of the device:
local aspectRatio = display.pixelHeight / display.pixelWidth
application = {
content = {
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 = 60,
imageSuffix = {
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}
but it seems not scaling my character jumps or object display:translate() movements when testing ins different screen resolutions.
For jumping I;'m using the following method
character:applyLinearImpulse(0, -15, character.x, character.y )
but when I use this in different screen resolutions, the effect is different and the object ends in different location.
However, if I use this other content in the config.lua
application = {
content = {
width = 480,
height = 320,
scale = “zoomStretch”,
fps = 60,
imageSuffix = {
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}
The jumping effect is similar in any screen resolution.
In case I use the option 1 for config.lua, Do I need to recalculate values used in applyLinearImpulse and translate methods?