1
  • using unprojectPoint simply doesn't work, it's broken or buggy

  • cam.fieldOfView just doesn't work, it returns strange values in all cases

  • xFov and yFov (deprecated) simply don't work now (and never did)

(Incredibly, I have to do this now, to actually find edges and hence know the camera viewing width angle. https://stackoverflow.com/a/72669555/294884 )

Does anyone know the current real solution?

starball
  • 20,030
  • 7
  • 43
  • 238
Fattie
  • 27,874
  • 70
  • 431
  • 719
  • what values did you get by the cam.fieldOfView and how did you read them? – ZAY Jan 07 '23 at 09:59
  • hi @ZAY , `.fieldOfView` gives you (what apple thinks is :) ) the field of view. in all cases, it seems to return a value somewhat less than the actual value - almost as if it's using a "safe area on the actual screen" [I mean assuming you have the scene full screen] rather than the actual real frustrum. it's pretty infuriating – Fattie Jan 07 '23 at 16:37
  • hi @ZAY I think I have stumbled on to the solution, thanks to your prompting me to check all work! stand by ... – Fattie Jan 07 '23 at 17:19
  • the solution would be really interesting. I tryed some stuff as well, and yeah, I did not find the solution. (assuming your goal is to find the width angle from the camera to the left and right side of the screen, if you held your i.Ex. iPhone in portrait mode.) otherwise it gave me an angle of 60 degrees .filedOfView (from the default project from scenekit) for the max length of the screen, as I think. pretty weird math to get the right values for other stuff (did you check this: https://docs.unity3d.com/Manual/FrustumSizeAtDistance.html) – ZAY Jan 07 '23 at 17:33
  • right, it's an Apple Mess! BTW yes, I'm extremely familiar with that sort of arithmetic, thank God! Heh! :) – Fattie Jan 07 '23 at 23:07
  • YES - coming asap! @ZAY – Fattie Jan 10 '23 at 16:06

0 Answers0