How do you make borders on the screen for objects to not go off? [import]uid: 39533 topic_id: 16356 reply_id: 316356[/import]
Using physics or not?
With physics, make static walls. Without, do this;
[lua]if obj.x < 0 then obj.x = 0[/lua]
Peach
[import]uid: 52491 topic_id: 16356 reply_id: 60993[/import]
using physics something like this works for me -
local side_right = display.newImage(“side_right.png”,-95,0)
physics.addBody(side_right,“static”, {density=1,friction=1,bounce=1})
local side_left = display.newImage(“side_left.png”,350,0)
physics.addBody(side_left,“static”, {density=1,friction=1,bounce=1})
[import]uid: 11094 topic_id: 16356 reply_id: 62801[/import]
opps
[import]uid: 11094 topic_id: 16356 reply_id: 62802[/import]