It looks like you're new here. If you want to get involved, click one of these buttons!
require "box2d" local world = b2.World.new(0, 9.8) -- physics boundries local width = application:getLogicalWidth() local height = application:getLogicalHeight() print(width, height) local boundries = { top = b2.EdgeShape.new(0, 0, width, 0), right = b2.EdgeShape.new(width, 0, width, height), bottom = b2.EdgeShape.new(width, height, 0, height), left = b2.EdgeShape.new(0, height, 0, 0) } for side, shape in pairs(boundries) do local body = world:createBody({}) body.name = side body:createFixture { shape = shape, density = 0 } end -- debug local debugDraw = b2.DebugDraw.new() world:setDebugDraw(debugDraw) stage:addChild(debugDraw) |
Likes: thomas2k6
Comments
"Project properties" your logical dimensions should be set to 320x480 not 480x320 or
480x800 not 800x480.
Maybe it is your problem? As a said i am not sure just a wild guess:D
http://www.giderosmobile.com/forum/discussion/586/automatic-screen-scaling
http://www.giderosmobile.com/documentation/automatic_image_resolution.html
As for the links, the first one looks interesting. I'll give it a shot unless someone has a better idea / more experience on this
try setting up something like this in the beginning of your app
But when I tried LANDSCAPE_LEFT
Any ideas @ar2rsawseen?
More info: http://appcodingeasy.com/Gideros-Mobile/Difference-between-content-logical-and-device-dimensions-in-Gideros-Mobile