destroy actor when it goes off screen?

I have a scrollable layer with platforms (that don't move) that need to be destroyed when they go off the screen. I've tried when self.Position.Y is less than 0 to destroy the actor, but it's not working- Please help, thanks!

Comments

  • FallacyStudiosFallacyStudios Member Posts: 970
    If their position is greater than 0 how would they fall under 0 to be destroyed without moving?
  • natzuurnatzuur Member Posts: 304
    Off the screen doesn't mean 0, thats a position on the far left of the SCENE, not screen. So you'll need to trigger it based on something else, or change the positions to 0.

    If you are tracking a main actor trigger it based on it's position, or trigger it based on the camera position.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited August 2013
    Put an invisible wall at either side of the screen (outside of the screen) and detect for collision with it. If true, destroy actor.
Sign In or Register to comment.