satguru Posted February 7, 2016 Share Posted February 7, 2016 In 2.3 the default panning behaves differently than in 2.2 Previously in 2.2 dragging mouse left right moved camera left right and dragging mouse up down moved the camera up down. in 2.3 dragging mouse left right moves camera left right and dragging mouse up down moves the camera forward backward. Is it possible to default to 2.2 behavior? Further 2.3 defines a panning axis. The axis seems to be in the World Space though. Shouldn't this be in the Camera View Space? Currently depending on the view, the panning behavior changes and can get confusing. Also instead of panning axis maybe there should be panning plane ? Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 8, 2016 Share Posted February 8, 2016 Yes, you are right. The default behavior was changed and can be very simply restored. Which brings me to the panning axis. What was meant here (and you are right, it might be a naming problem) was the axis the camera will move on when panned. Or better, what axis will the x and y coordinates of the pointer will change. For now, X is "always on", and you can decide between the (3D) y or z (or both) to be moved by the y axis. So! Changing the panning axis to 1,1,0 will get you the default left-right-up-down behavior. The default now is 1, 0, 1, which pans across the surface. The axis can be considered "in world coordinates", since we are taking about absolute y and z coordinates. Panning in local-coordinates will cause the camera to behave differently every time the use changes the camera's rotation. which I am pretty sure will drive everyone crazy but it is more than possible to actually implement it. I hope this helped! Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 8, 2016 Share Posted February 8, 2016 I think we should put the previous axis back, it clearly make sense to have left-right-up-down behavior by default for this camera. Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 8, 2016 Share Posted February 8, 2016 It's more than possible. I just thought panning over maps would be more useful. If there are no objections or a different opinion, I'll bring the old behaviour back. Quote Link to comment Share on other sites More sharing options...
satguru Posted February 8, 2016 Author Share Posted February 8, 2016 Thanks for the nice explanation. Unfortunately setting panning axis to 1,1,0 does not work like in 2.2 It works like 2.2 only if the camera is facing the world z axis. If it faces world x axis, panning only moves the camera forward and backward. (which is along 1,1,0 plane - but not what we really want :)) see playground example http://www.babylonjs-playground.com/#24DXE9 Quote Link to comment Share on other sites More sharing options...
satguru Posted February 8, 2016 Author Share Posted February 8, 2016 35 minutes ago, RaananW said: It's more than possible. I just thought panning over maps would be more useful. If there are no objections or a different opinion, I'll bring the old behaviour back. Having experienced it now, I do like the idea of panning over maps and I think that option should be provided but the default behavior, I think, should be same as before so as not to break existing code. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 8, 2016 Share Posted February 8, 2016 Can't agree more Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 8, 2016 Share Posted February 8, 2016 Hmmmm Let me fix that Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 8, 2016 Share Posted February 8, 2016 Ok! Back to normal! Default behavior was restored, and the up-down panning was fixed. I wonder what I was doing when I tested it. Because I did... Anyhow! Working. This is a demo before merging into the framework - http://www.babylonjs-playground.com/#24DXE9#2 GameMonetize and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
satguru Posted February 9, 2016 Author Share Posted February 9, 2016 Great! Thanks 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.