Vijay Kumar Posted February 22, 2016 Share Posted February 22, 2016 Hi , can anybody please help meI want to move the freecamera in x and y direction according to the mouse drag, By default freecamera moves in x and z direction when direction keys are pressed. in the same way : mouse click and drag right side - camera has to move on right side (X-Axis +) mouse click and drag Left side - camera has to move on left side (X-Axis -) mouse click and drag Up side - camera has to move on Up side (Y-Axis +) mouse click and drag Down side - camera has to move on Down side (Y-Axis -) and please help me how can i get the updated values of x and y ,when mouse is clicked and getting dragged. i am new to javascript coding not having good knowledge on keyboard and mouse events . Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted February 22, 2016 Share Posted February 22, 2016 hi how you wanna rotate camera (or you not have any rotate)? Quote Link to comment Share on other sites More sharing options...
Vijay Kumar Posted February 22, 2016 Author Share Posted February 22, 2016 Hi I don`t want to rotate camera. i want to move camera up,down,left and right based on mouse movements. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted February 22, 2016 Share Posted February 22, 2016 http://www.babylonjs-playground.com/#2A8EWB#2 test this Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Vijay Kumar Posted February 22, 2016 Author Share Posted February 22, 2016 Thanks NasimiAsl Thanks for the immediate response Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted February 22, 2016 Share Posted February 22, 2016 Your Welcome 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.