Jump to content

Camera more sensitive to touch in mobile device


dsman
 Share

Recommended Posts

Compared to mouse drag events on desktop browser, babylon camera seems to be much more (2x or 3x) sensitive on mobile device when using touch/swipes. 

 

This is probably because when we swipe by finger over the mobile phone screen , we cover 80% area of screen normally in one swipe. While when doing by mouse in browser, in drag we usually cover 20-30 % screen area. So I am guess this difference is making camera more sensitive in mobile device when touch is used. 

 

Is there anyway we can reduce sensitivity only for mobile device . May be in hand.js somewhere ? Or we have to detect type of device and then change camera.speed accordingly ?

 

 

Link to comment
Share on other sites

To change camera sensitivity you have to change camera.angularSensibility.

 

You can detect device type to change that value for mobile only,

or extend ArcRotateCamera and change behaviour in _onPointerMove and _onMouseMove

or detect events and change angularSensibility according to event.pointerType (can be event.POINTER_TYPE_MOUSE, event.POINTER_TYPE_PEN, or event.POINTER_TYPE_TOUCH)

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