Walls in landscape

I’m trying to make my walls in landscape instead of portrait. I have my top wall working but I can’t figure out the bottem, left and right.

self.walls[1] = display.newRect(0, 480, 1, 1) -- Top, Working self.walls[2] = display.newRect(320, 480, 1, 1) -- Wrong self.walls[3] = display.newRect(0, -1, 320, 1) -- Wrong self.walls[4] = display.newRect(-1, 0, 1, 480) -- Wrong [import]uid: 41473 topic_id: 7236 reply_id: 307236[/import]

Are you sure about that? The first two walls you’ve created are both 1 pixel by 1 pixel… [import]uid: 8271 topic_id: 7236 reply_id: 25488[/import]

I’m not sure about it. I’m trying to make invisible walls on the edges of the screen in landscape mode. I had them working for portrait but can’t find the right coords for landscape. [import]uid: 41473 topic_id: 7236 reply_id: 25517[/import]

You’ll probably need to detect the orientation change and respond to that event. [import]uid: 8271 topic_id: 7236 reply_id: 25523[/import]

Are you sure they’re working? From what I can see, your first rect is placed at 0, 480, with a 1x1 area. Which means this rect would only cover a 1x1 area at the bottom left corner?

The first two parameters decide where the rect is placed on the grid, the second two decide the length and height.

Top: 0, 0, 480, 1

Left: 0, 0, 1, 320

Right: 480, 0, 1, 320

Bottom, 0, 320, 480, 1

Try with these settings and see if they work

Edit: And to make them invicible, just make them all local variables and set their alphas to 0 or try changing all the 1’s to 0’s (Not sure if this will work though) [import]uid: 14018 topic_id: 7236 reply_id: 25527[/import]

Ill try this when I get home from school. Thanks! [import]uid: 41473 topic_id: 7236 reply_id: 25536[/import]