Jump to content

Panning by means of touch


Rajkumar
 Share

Recommended Posts

Hi All,

I would like to use babylonjs from a touch device.

Zoom in and zoom out by means of pinch works in a touch device (mobile/ tablet)

http://www.babylonjs-playground.com/#AMEB6#0

Panning works on pc by holding CTRL+Drag.

What is the best way to implement panning on a touch device ? 

one touch drag would rotate the scene.

Will it be possible if I want to use 2 touches and drag to pan ?

Regards

Rajkumar

Link to comment
Share on other sites

Hey,

first of all you can turn off touch to rotate by not calling camera.attachControl.

If you want to add panning with 2 fingers, I recommend adding an event handler for pointerDown event.

A good read: https://blogs.msdn.microsoft.com/davrous/2015/08/10/unifying-touch-and-mouse-how-pointer-events-will-make-cross-browsers-touch-support-easy/

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