Jump to content

Rotate Camera in VR


little_bigben
 Share

Recommended Posts

Hello,

I'm developping a web VR editor for 360 video experiences, and I would like in this case to force the camera rotation when I change my POV.

I tried to use setTarget on ArcRotateCamera, but it doesn't work when scene.createDefaultVRExperience() is called.

How could I change my camera rotation?

Thanks,

Benjamin

Link to comment
Share on other sites

The simplest way would be to change the camera's rotationQuaternion to the desired rotation. A VR camera is not an ArcRotate camera but (internally) a FreeCamera.

You can also reset the camera's pose (camera.resetToCurrentRotation()) so that the "forward" rotation of the camera will be the one you are currently looking at.

And always remember, the user is constantly rotating, you shouldn't limit that.

 

 

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