Wrap-around?

What is an easy way to tell if an object has gone of one side of the screen to pop back on the other?

if object.x > screenwidth then object. x = 0 - screen.width

@carlos, wouldn't that depend on the ReferencePosition of the object? In most cases it defaults to the centerReferencePoint which means that you might get just half of the sprite sticking out when it starts to disappear

cheers,

?:)

pseudo code - figure one can take it from there ;-)

c.

Hey,

This seems unnecessary now but it might still help, depending on how new you are to Corona -

http://techority.com/2010/12/08/how-to-wrap-your-iphone-apps-screen/

It's had some good feedback :)

Peach

views:1391 update:2011/9/29 19:21:19
corona forums © 2003-2011