• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

How to detect if an object is at the view's edge?

N

Noba

Guest
So, title is pretty self explanatory. I'm looking to detect if an object is at the edge of the view.

The reason being, is that I have a flying drone enemy which moves left, stops, fires a bullet, then repeats, but when it gets to the edge of the view I want it to move right. I know how to do this, but now how to detect when it is at the edge of the view.

One other thing, is how would I set it so that when it stops to fire the bullet, it still stays in the same place inside the view?
 
Top