Jump to content

ArcRotateCamera Mouse Interaction problem after changing upVector


Recommended Posts

I am working on babylon for few days. and I am a beginner level on 3d libraries.

I changed the upVector of ArcRotaionCamera. and now the z Axis is pointing up.

but while dragging the mouse to move around it not working as expected.  is there a way around this?



Link to comment
Share on other sites

Hi @Themujin, welcome.

Forum helpers REALLY like having playground demos that show the issue.  I made one for you...


upVector Z is set in line 32.  And yes, mouse is acting... 'unusual'.  I have no solution, but now we have a testing playground. 

Do edits, make more saves, paste more urls here, tell us about discoveries.  You can't damage anything... by playing in the playground.

Hopefully, smarter people than I... will comment soon.

Link to comment
Share on other sites


by default all controls consider that Y is up.

but you can check here that angles are updated when moving the pointer: https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/Inputs/babylon.arcrotatecamera.input.pointers.ts#L106

So basically the idea would be to overwrite this function to provide a different behavior 

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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...