Hi
We have a simple sprite setup in Unity with transparent cloud plane object in front of a sky plane object. This displays perfectly until I move the UV texture of the clouds to make them move with the following line:
renderer.material.mainTextureOffset = Vector2(Time.time * 0.2);
The UV texture moves exactly as I want it but the cloud plane object displays behind the sea plane object. It’s as if as soon as i move the texture with the code above the Z-buffer gets confused and puts it at the back.
The cloud plane uses a Transparent/VertexLit shader - we’ve tried all the other Transparent shaders and they do the same. However, the CutOut shaders do work OK when the texture is moved but look damn ugly.
Also this behaviour only happens in Unity iPhone (hence why this is post is here) - I tested the project in Unity Pro and it works perfectly. This suggests it’s either a bug with Unity iPhone or it’s something that’s possibly not supported for the iPhone (although I can’t see a reason why if the shader works when not moved).
I can work around this problem by moving the objects instead but just thought i’d throw this one up in case anyone is aware of a solution.
Any ideas much appreciated.
Cheers
Paul