sep181 Posted February 17, 2016 Share Posted February 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 17, 2016 Share Posted February 17, 2016 warning: ontouchmove does not work on all browser. Because Babylon.js relies on Jquery PEP, I suggest using onPointerMove Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 23, 2016 Share Posted February 23, 2016 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.