Jump to content

How to get ArcRotateCamera work with touch enabled mobile devices


Recommended Posts

So we have very simple model we are displaying in babylon using ArcRotateCamera . It is like a product preview so ArcRotateCamera is best choice for that. We want to show this in webview inside mobile apps. 


So first I started checking various default mobile browsers. 


Windows Phone 8.1 -IE : ArcRotateCamera is working fine with touch gesture. Rotating using swipes is perfect. Zooming in and zooming out using pinch to zoom is also working fine. 


Android 5.x - Chrome :  No touch gesture are working. 


I then checked TouchCamera. TouchCamera doesn't suit our need. And anyway it behave in weird manner in Android Chrome. (Very sensitive and few other things)



Any way to get ArcRotateCamera to work with touch gestures in Android and other devices , the same way it does in Windows Phone/IE ?



Link to comment
Share on other sites

  • 4 weeks later...

I think this thread should be deleted. It was so silly. 


I had included hand.js file. But the order was incorrect. It was after babylon.js file.  I never paid attention to it until you pointed out about dependency. 

Now it works perfectly.  


You should not delete it at all, I had the same problem, I never wonder that Hand.js had to be included before babylon.js.

Thanks for sharing, I solved my problem too.

Link to comment
Share on other sites

  • 5 months later...

Defo do not delete.. This is an easy mistake to make... And this post helped me a lot. For PC developers (with a touch screen), does your app work for touch on chrome (it will probably work for ie/edge/ff without hand.js)? If so it will work on other touch devices designed primarily for touch like iOS/android.

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.

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.


  • Recently Browsing   0 members

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