Jump to content

Swapping Cameras?


chicagobob123
 Share

Recommended Posts

I really don't know what I am doing so I am trying plodding along trying different things. 
Goal to start in Orthographic mode then go to 3D view ...  like Google Maps. You start with the street view then you
slide down into 3D view. 
 
I stole some playground code from WingNut and slammed it together to try and make it work .
I am not sure I need a rendertarget. 
 
Then I tried to switch them with a button. 
I am going to keep working on this as I need to do this but any ideas things to read would help. 
I have looked around and don't understand much of what I am seeing. 
 
if(cam1)
{
scene.removeCamera(camera1);
scene.addCamera(camera);
cam1 = false;
alert("Going to Cam");
}
else
{
scene.removeCamera(camera);
scene.addCamera(camera1);
alert("Going to Cam1");
cam1 = true;
}

https://www.babylonjs-playground.com/#1WROZH#36

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...