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?
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?