Sign in to follow this  
dreinzy

Transitioning between camera types

Recommended Posts

I would like to be able to switch between ArcRotateCamera and FreeCamera with as little motion as possible.

I haven't been able to figure out:

1) How to get the FreeCamera to face the same direction as ArcRotate was when switching.

2) How to remove the 'spinning' effect when switching.

You can 'coil' a camera up by rotating it several times and after switching, it 'uncoils' itself by rapidly spinning.

I thought that for FreeCameras this number is stored in .rotation.y and .alpha for ArcRotateCameras, but limiting these to ±Math.PI doesn't fix this issue.

Don't really want to set inertia to 0 because I like inertia :)

 

PLAYGROUND LINK

Share this post


Link to post
Share on other sites

There is something I'm completely missing here.

If I take away all inertia and only switch between cameras without setting positions/targets/anything. I expect any change in one camera to have no effect on the other, but this is not the case. Looking around with one camera changes the other's position/direction.

https://playground.babylonjs.com/#DF2CNN#2

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.