Jump to content

solved: Parenting ArcRotateCamera in VR-Mode fails


javalang
 Share

Recommended Posts

I want to use an ArcRotateCamera where the position and direction of the camera is determined by a parent object like in this rollercoaster playground where the player can additionally look around. So far so good, thaks to the creator @jerome I guess.

I'd like to extend this szenario with a barrel distorted stereo output (using cameraRigMode_VR), but parenting the camera to an object (wagon in case of the playground) does not work, stereo output works, but no parenting.

Can someone give me  a hint please?

Thanks in advance

 

 

 

 

Link to comment
Share on other sites

Uhhhh hard to find but easy solution, answering myself: in case using anyVR-camera (includes using RigMode_VRXXX ) there is an array created with two new cameras instantiated, one for the left  and one for the right eye.

The solution is: 

camera.rigCameras[0].parent=<parentobject>; 
camera.rigCameras[1].parent=<parentobject>;

playground

Link to comment
Share on other sites

:)  http://www.html5gamedevs.com/topic/31278-parent-mesh-with-vrdeviceorientationfreecamera/

Ever use forum search?  heh.

Just havin' fun with ya.  Don't take is seriously.  :)  Really, thanks for sharing/teaching... I love it.

Umm, umm... be sure to read my last post in that thread.  I was astral-projecting (out-of-body) when I wrote it, so it was probably being typed by a dead coder, and they are usually much smarter than I.  Might be worthy of heeding... but no promises.

As best I can tell, it talks about how to avoid having your eyeballs bang-into each other... when looking hard-left/right.  :)

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