I am using a single mesh, imported as FBX, that is a collection of Z facing facades and planes with a perspective camera translating along the x axis to create a nifty parallaxing effect. The idea is to create a layered environment, kind of like something you would see from a platformer. I thought I ran into this issue here, since it fairly accurately describes my issue. Also, to improve iPhone performance, I’m keeping to an unlit alpha-blended shader. So I followed the lead answer of incorporting this into my camera:
camera.transparencySortMode = TransparencySortMode.Orthographic
No dice. I discovered next, however, that my issue was completely solved by using an alpha-test/cutout shader of any kind, but not the unlit blended shader.
My best guess at the problem may be connected to how I constructed my model. The model is several separate components of polygons, with no geometry connecting them inbetween. My goal is to avoid splitting this model up into separate meshes (since it’s fairly heavy in unconnected geometry), so I’m trying to figure out why Unity is having issues sorting these layers according to how I see fit.
Any insight or solutions, anyone? I’ll comment with updates as I progress on the issue.
Can you not export them as multiple objects? A single mesh is not internally Z sorted and so cannot use blended transparency.
– whydoidoitI'm simply trying to avoid it for ease-of-use. But why the problem is happening makes sense, thanks.
– beeeeeepboopI'm no expert on modelling packages, but can't you get it to output each of the planes as a sub mesh so that it gets its own renderer? (That's whay would happen with skinned meshes anyway I believe). In that way you would have the layering and still have a single FBX.
– whydoidoitEasily. The only reason for not doing so thus far was not believing it to have a different effect on how it was rendered. I'm being told by some colleagues the same thing you are mentioning here, so I'm quickly reconstructing the mesh this way to give it a shot.
– beeeeeepboopPersonally I find this just as confusing as the manual's original explanation. The key problem here is that it makes it sound like .Force and .Acceleration will continue to apply the force over 1 second's worth of frames, when in reality they don't do anything past the single frame where you call them.
– Clonkex