Author Topic: Tickers being clipped.  (Read 361 times)

Anomika

  • Newbie
  • *
  • Posts: 32
    • View Profile
Tickers being clipped.
« on: February 01, 2019, 06:17:21 PM »
I don't know why .005f didn't work for me. but changing it to +1 worked.

float z = cameraMain.nearClipPlane + 1f;

I set my nearClipPlan to 0, to -10, to 10, 2. Moved all objects around. Nothing worked except parenting atleast 1f away.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Tickers being clipped.
« Reply #1 on: February 02, 2019, 04:41:15 PM »
HI,

When you say "parenting at least 1f away", what are you parenting and how?
nearClipPlane should be something at least 0.3 or greater. The lower the value (always>0) less depth buffer accuracy hence more z-fighting issues. However regardless of the near clip plane tickers should not clip.
Can you post a screenshot of the problem? Thanks.

Anomika

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Tickers being clipped.
« Reply #2 on: February 04, 2019, 06:31:20 AM »
I'm saying I tried a bunch of nearClipping plans to fix the issue but it didn't fix, so I modified your parenting code to place the tickerband 1f away instead of (i think it was) .6f. This fixed the issue, but i'm not sure why I need to be a whole 1f away from camera.

Attached are screenshots of it not working.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Tickers being clipped.
« Reply #3 on: February 04, 2019, 08:46:51 AM »
When overlay mode is enabled, the tickers band base layer is positioned in front of the camera using its near clip plane plus a small offset:

Code
float z = cameraMain.nearClipPlane + 0.005f;

I've checked that this position is no longer updated if the TickersLayer gameobject exists (the position is only set when the root gameobject is created). So it could be possible that it was created with a different near clip plane and have been using that position even after you changed the nearclip plane of your camera. It's now changed to update the position on every start.

Anomika

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Tickers being clipped.
« Reply #4 on: February 04, 2019, 10:08:40 AM »
I understand the logic and I totally makes sense. So, what am I missing here. because regardless of where it is created, I can move it in the inspector and my camera is clipping it anywhere under 1.3 when the nearClip is set to .3

here is a photo of it set to 1.2 and it's not showing in game view. When i change it to 1.3 it shows up. For some reason It's clipping 1+nearClip range.

Anyhow, I agree it's not an problem with your code but something with my camera that i've not figured out yet.