Jump to content

Why this -Z camera up vector is not working?


Recommended Posts

No, sorry, i must pass here. I understand where the problem is, but for a quick fix, i would like ping @Deltakosh

The reason: mouseEvents are { scoped functions } and listening in a loop on changes, when you click with the mouse the default cached -state of the Babylonjs Camera is activated. So the fix would be to implement own mouseHandlers and rotate the Camera from their. 


Just wait for Deltak. he can explain it better i guess.


Link to comment
Share on other sites

Hello this is because the default camera handlers expect the up vector to be 0,1,0.


As @Nabroski mentioned, the best idea would be to implement your own input: http://doc.babylonjs.com/how_to/customizing_camera_inputs

This is the default one for the record: https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/Inputs/babylon.freeCameraMouseInput.ts


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