Jump to content

How can I get/set a FreeCamera's rotation or pan angle?


hfeist
 Share

Recommended Posts

I am trying to capture a FreeCamera's location and pan angle or rotation so I can reposition the camera later with the exact same view. 

(I am working with the playGround Collision example)

I seem to be able to get camera.position.x, camera.position.y and camera.position.z ok but camera.cameraRotation.y just yields zero every time

Link to comment
Share on other sites

Thanks, works great!

Of course now I'm stuck trying to set the camera postion to the values I've collected. Just setting them simple-mindedly like so doesn't work:

camera.position.x=firstX;
camera.position.y=firstY;
camera.position.z=firstZ;
camera.rotation.y=firstR;

Link to comment
Share on other sites

I was wrong. We were having db maintenance going on and my positions weren't being saved.  I can now get the camera to return to the saved  x,y and z positions and the rotation works as well just by setting the camera.rotation.y to the saved value.

Now if I could save and retrieve the tilt angle of the camera I'd just about have things working perfectly.

Thanks so much for the help!

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