Author Topic: 3D GUI and FOV  (Read 4270 times)

MentalFish

  • Guest
3D GUI and FOV
« on: June 30, 2012, 12:33:24 PM »
While rotating a 3D GUI element, it looks better (less stretchy) when the GUI camera's field of view is set to a bit lower than 60°. What changes do I have to make in NGUI so it can make pixel perfect sizes again at other than the non standard FOV size?

At 480x320 the UIRoot scales to: 0.00625 which is produced by this in the UIRoot script:
manualHeight = Mathf.Max(2, automatic ? Screen.height : manualHeight);
float size = 2f / manualHeight;
<- What is happening here? :)

Also why is the depth offset set to 1.7, has that got something to do with the FOV of 60°?

Personally i would like to set the FOV to 45°.
« Last Edit: June 30, 2012, 12:36:03 PM by MentalFish »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3D GUI and FOV
« Reply #1 on: June 30, 2012, 01:52:59 PM »
The 3D UI is never pixel-perfect. Only the 2D UI is with UIRoot set to 'automatic'.

1.7 is just an eyeballed value. You'll need to eyeball it as well.

MentalFish

  • Guest
Re: 3D GUI and FOV
« Reply #2 on: July 01, 2012, 05:06:59 AM »
Ok, thanks, and thanks for an awesome product. No need to wait around for Unity's next GUI system when we have this :)