Jump to content

ArcRotateCamera panning behavior in 2.3


satguru
 Share

Recommended Posts

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 ?

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

 

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.

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

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...