Jump to content

Create camera based on settings in 3D Studio Max


culeaalex
 Share

Recommended Posts

Unfortunately right now the exporter only exports freeCamera but you just have to execute this code once the scene is loaded:

cam.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA;

You can then control the view with cam.orthoLeft/orthoRight/orthoBottom and orthoTop

 

My code:

var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene);camera.setTarget(new BABYLON.Vector3.Zero());camera.attachControl(canvas, false);camera.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA;camera.orthoLeft = 5;camera.orthoRight = 5;camera.orthoTop = 5;camera.orthoBottom = 5;

The view is too far whatever I do. I must say I have never worked with 3D before, and I have few to no clues on what to do.

Link to comment
Share on other sites

Hi, 

 

If you use the search bar, there is an example of what you could have find: http://www.html5gamedevs.com/topic/8712-ortho-camera/?hl=ortholeft#entry51822

 

I found that answer. Than I had to deduct that somehow is a zoom for orthographic view and also I have to multiply with the ratio of the canvas.

And again, no answer on why exactly is there a orthoLeft etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...