Individual actor no wrap
sparkzilla
Member Posts: 152
Hi,
I have some actors that I want to wrap (come back on the other side of the screen) and some that I don't. Is it possible to make it so that an individual actor in a scene does not wrap?
I have some actors that I want to wrap (come back on the other side of the screen) and some that I don't. Is it possible to make it so that an individual actor in a scene does not wrap?
Comments
so, if you're making a landscape game, create 2 rules like this :
RULE 1:
if
self.position.X < 0
and
self.linearVelocity.X < 0 (this makes sure the actor is going to the left - otherwise, the wrap rules would just bounce the actor back and forth)
then
change self.position.X to 480
RULE 2:
if
self.position.X > 480
and
self.linearVelocity.X > 0
then
change self.position.X to 0
you may have to change some of the numbers to get the actor to fully go off screen before wrapping (this depends on the size of your actor of course.