2

Currently I am working with the bablyon.js engine and the only major issue i have so far is the FOV.

The FOV is to shallow that it causes bad rendering appearance at times.
Currently i am using BABYLON.FreeCamera() as the primary camera with controls attached, this is the format i am using:

var camera1 = new BABYLON.FreeCamera("camera", new BABYLON.Vector3(x,y), scene);

I have done some looking around and from my searches seem to point to there is a way but i can not seem to find the actual way to set it, if someone could help me out it would be greatly appreciated!

LJᛃ
  • 7,655
  • 2
  • 24
  • 35
Jamie
  • 41
  • 1
  • 4

2 Answers2

2

So in the end i found the answer to my own question. The way that Babylon sets FOV is not how it sets most settings. It does set it as an array modifier, but does not take the setting the same way.

var camera = new BABYLON.freeCamera("fCamera", new BABYLON.vector3(1,1,1), scene);
camera.fov, 3;

the way you adjust the FOV is from 0.1 up, from my testing of it about 1 is the default. By changing it up the 2 or 3 the field of view is increased to a more suitable field of view that is a nice rendering distance and corrects for the janky feel.

I also have found going above 4 if you don't have a nice gpu it starts to lag more due to the amount of graphics being processed

Jamie
  • 41
  • 1
  • 4
  • Sure about that? an equals assignment works for me. By the way, I think the highest the fov, the more distorted it is displayed – DPM Jan 15 '18 at 05:34
-1

The default FOV on a free/universal camera is pi/4, or 45 degrees. It is expressed in radians

Edit: I didn't read the full question, to change a free/universal camera's FOV, use camera.fov = targetFov;

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/32791634) – EDG956 Sep 30 '22 at 22:46
  • Sorry, I didn't read the full question – Fletch McGaulghan Oct 02 '22 at 18:33
  • To change the camera's fov just use camera.fov = – Fletch McGaulghan Oct 02 '22 at 18:34