Jump to content

Touch panning in ArcRotateCamera


sep181
 Share

Recommended Posts

Hi everyone,

I'm trying to add a new gesture to ArcRotateCamera. I need the camera to pan with a two finger gesture. When you moves the fingers around the screen, the camera pans with them. I have some approaches to a solution, one of them is to overwrite the ontouchmove event associated to the canvas losing the default touch events in the process I think. The other solution is to overwrite the ._onGesture or the ._onGestureStart camera methods, but I think it's the same.

It would be nice to have the ability to extend the ArcRotateCamera behaviour adding more functionality (or at least the same Desktop functionality).

Thanks in advance.

Link to comment
Share on other sites

About extending -

Making each camera type "extendable" will be relatively hard. There is already an extendable camera - which is the Camera Class. you can do with it anything you want, even live in your code. The ArcRotate is a specific type of camera. You can of course extend the ArcRotate.

this seems to me like a (relatively) minor change in the onPointerMove event already registered. The source is there - create your own camera

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