A game we’re developing has tons of buttons and GUI stuff, so I’ve been coding everything to be GUI 1.0. Thus far, though annoying, it hasn’t been impossible by any means. However, I’ve run into a bit of a wall that I can’t seem to get over.
A box slides down and will have some options in it that the player can slide/flick through. However, below the box are some separate graphics, so I need the scrolled options to disappear at a certain point. Due to multiple graphics and a background with separate Z values, I can’t just use the depth of other GUITextures to hide them.
Any idea on how to do this? I wasn’t able to find anything in the forum. Any help would be appreciated, thanks! ^^
Or if you want it back again, just move it off screen.
if (object.transform.position.y < disappearancePoint)
object.transform.position.y = 4.0; // GUI coordinates are 0.0 to 1.0, so this moves it off screen
Have you tried rendering these to a separate camera to make the appearance of disappearing on screen. I Had to play with new camera settings to get it working. Works pretty well.
Here’s the issue, there’s no DEFINING line where they disappear past. Imagining scrolling inside a window. You can’t just have it scroll downward until it’s off the window, you’d see it while it’s outside of the frame.
I don’t want them to disappear instantly, I want a way to NOT render them in a given area.
Basically, when scrolling in the direction of the red arrow, they would overflow in the area of the green circle. Is there any way so they’d start to disappear, only rendered within the side box area?
Remember that this is GUI 1.0 for the iPhone. Thanks for any help!
I havent used gui 1.0, only ezgui, but i assume you can still render your buttons to a separate camera on a different layer. Just size or position the camera to disappear before the green area of your pic.