Author Topic: [SOLVED] Strange Scene behavior: items disappear in certain camera angles  (Read 3957 times)

vexe

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 153
    • View Profile
This is really strange, but sometimes I get this behavior where my widgets disappear if I look at them from a certain camera angle in the scene view, and re-appear if I look at them from another angle! - See attachment.

This happens most the times when I have more than one panel, it evens happens to me in some of the example scenes, like the clipping scroll view.

It's really annoying, how to fix it? why is it happening?

Thanks.
« Last Edit: September 05, 2013, 04:48:04 AM by vexe »

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
This is down to the camera type. Unity doesn't seem to be able to cope with long billboarded objects with textures all intermingling. There isn't really much you can do about that, unless you put larger distances between all your objects in the Z axis.

As long as everything looks find in your Game window, there is nothing to worry about.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Different panels / atlases = different draw calls. Different draw calls are sorted by Unity based on the distance from the eyepoint of the camera to the object's center. When you tilt the camera, that distance changes, resulting in the draw order changing as well.

This is why you should stick to 2D UIs when you have multiple panels / atlases.

Also, there are two sticky posts explaining this issue in great detail. Helps if you read them, or at least do a search before posting. :|