kkimdev Posted August 1, 2018 Share Posted August 1, 2018 I have been playing with the camera up vector in BabylonJS, but I feel like I don't understand how they actually work. I created the following minimal example. https://www.babylonjs-playground.com/#B8JZ20#1 To my understanding, the up vector should only affect the up direction, but in the example, if I change the up vector to +X or +Z, it no longer targets (0,0,0) which I set every frame. I'm creating a game that Z is up vector, and can't get it stabilized https://www.babylonjs-playground.com/#ZJHCXB Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 1, 2018 Share Posted August 1, 2018 Like this maybe? https://www.babylonjs-playground.com/#ZJHCXB#1 Quote Link to comment Share on other sites More sharing options...
kkimdev Posted August 2, 2018 Author Share Posted August 2, 2018 Wait, what's scene's upVector? I can't find it in the doc http://doc.babylonjs.com/api/classes/babylon.scene . Also, I noticed that it's not constant single direction rotation, I guess it's different from how camera's upVector is supposed to be working? Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 2, 2018 Share Posted August 2, 2018 Hello first i agree with you, Z Up is the natural and intuitive approach to explain out world, also the language of mathematics. Regardless of tutorials i can post, i feel you make it, on your own. Its really nothing BabylonJs do, it's about general attempt to imitate our world in 3D Graphics, you can read about it in DirectX or OpenGL, it doesn't matter. Theirs a need, like centuries before done by painters, to construct a camera and project, re-project 3D on to a 2D canvas, the monitor screen. And the short answer to your question: You can lean forth and back with you head , rotate it, but you can also lean/tilt sideways and that is the UP Vector. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 2, 2018 Share Posted August 2, 2018 No worry it is a bug! I'll fix it for next commit kkimdev 1 Quote Link to comment Share on other sites More sharing options...
kkimdev Posted August 2, 2018 Author Share Posted August 2, 2018 Thanks! Confirmed that it's fixed in 3.3.0-alpha.14 GameMonetize 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.