
I included this image to show off the GUI, the animated children and the particle snow effects.
Now, this game was made in Unity, and usually, when wanting to have particles on top of a flat drawing, I would take a Quad and just add the image as a texture or Sprite, then scale it to fit the screen. However, this is probably that bad way of going about that, as I believe you cant be totally sure if it scales or is displayed properly. The right way of going about it, when the background is a flat 2D image, is to use GUITexture to display it, and it will always be displayed totally perpendicular to the screen.
Now, GUITexture is always at the very front of the image - you can, as is the case with the children and the Back button above, increase or decrease that certain objects z-value, and it will be displayed in front of- or behind whatever you want. However, this trick does not work with the Particle system, so in order to display this in front of the background, I had to add the particles to their own layer, create a second camera which would only view the particles and was set to depth only, remove the GUI layer from particle camera and give it a different depth value than the original - quite complex, but it was a great relief when it started working!
Ingen kommentarer:
Send en kommentar