Jump to content

how to pitch an ArcRotateCamera?


jellix
 Share

Recommended Posts

Hi,

my ArcRotateCam should permanently look down to 18 degrees relative to it's "real" angle (looking to the target).

For that I tried to use within each render-loop:

myArcCam.rotation.x -= Math.PI/10

or

myArcCam.cameraRotation.x -= Math.PI/10

without success.

I also tried to apply a modified matrix to he camera but this doesn't seem to be allowed.

Another idea was to add another camera, parent it to my arcRotateCamera and let the nested camera look down. But then the controls dowsn't work anymore.

Also with registerAfterRender no success.

 

Thanks for advices!

Link to comment
Share on other sites

Hi @jellix, good to see you again.

I was touring-around on the camera object...  console.log(camera) and then go click on the object in the F12 dev tools area, and you get an object inspector...

(I really like object inspectors, so I push everyone towards using them)  :)

ANYway... I found an interesting property, that lead to this... camera.targetScreenOffset.y = 25;

Don't ask me what that '25' means.  degrees?  newtons?  calories?  Dunno.  Probably pixels... because .targetScreenOffset is a Vector2. 

All in all, it sure does pitch-down the view...  from an arc-tater cam... quite well.  Might work for you. Party on!

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