kkimdev Posted July 31, 2018 Share Posted July 31, 2018 Hi I'm trying to set -Z as the camera up vector but it doesn't render properly like the following. https://playground.babylonjs.com/#NPLRI3 Setting the up vector to (1,0,0) or (0,1,0) works though. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 1, 2018 Share Posted August 1, 2018 https://playground.babylonjs.com/#NPLRI3#1 Quote Link to comment Share on other sites More sharing options...
kkimdev Posted August 1, 2018 Author Share Posted August 1, 2018 19 minutes ago, Nabroski said: https://playground.babylonjs.com/#NPLRI3#1 Thanks. I tried your example, but when I control the camera by mouse dragging it breaks badly. Do you know the reason? Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 1, 2018 Share Posted August 1, 2018 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. https://playground.babylonjs.com/#NPLRI3#2 Just wait for Deltak. he can explain it better i guess. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2018 Share Posted August 1, 2018 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 kkimdev 1 Quote Link to comment Share on other sites More sharing options...
kkimdev Posted August 1, 2018 Author Share Posted August 1, 2018 Thanks for the anwers! Quote Link to comment Share on other sites More sharing options...
Guest Posted August 2, 2018 Share Posted August 2, 2018 (And btw there was a bug I fixed Will send a new nightly soon) kkimdev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.