remove object problem

I have 2 objects, food and enemy
I made them ( transition ) from right to left and create them to be more than one,

all foods and enemies move from right to left,

i want to remove them when they go out of the screen, I made that,

but when I play my game, after 3 minutes , there are some of them stop at the edge of the left screen,

I do not know why ? [import]uid: 13061 topic_id: 8919 reply_id: 308919[/import]

Your problem doesn’t sound too bad, but I’m afraid you’re going to have to share some code for anyone to be able to help you out with that… [import]uid: 52430 topic_id: 8919 reply_id: 32638[/import]

I fixed the problem,

I made rectangular in the left edge, witch has no color,

then I made function that , when food and enemy collide with it, they will remove them self ,

when I tested it , work fine,

is this good solution ?

[import]uid: 13061 topic_id: 8919 reply_id: 32744[/import]

A good solution is one that does what you want it to without causing errors, performance issues, etc.

If your objects are now removing themselves as intended, then great :slight_smile:

Peach

PS - I used invisible walls in my first Corona app, they worked out well. [import]uid: 52491 topic_id: 8919 reply_id: 33373[/import]

I did that also, good idea , [import]uid: 13061 topic_id: 8919 reply_id: 36711[/import]