Gerente Posted August 2, 2015 Share Posted August 2, 2015 Hi, Im doing a small app that should work for PC and Mobile. The camera need to be in (0,0,0) and rotate, and never move. - When I use FreeCamera, swipe the screen in a mobile does NOT work, but drag in PC works perfect.- When I use ArcRotateCamera the swipe in mobile works perfect, and the drag in PC as well, BUT the ArcRotate does not stay in (0,0,0).- TouchCamera does not work on PC neither in MOBILE. Any Idea? what Im doing wrong? why TouchCamera does not work on swipe in a Mobile?Im using an Iphone 6. Thanks Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 3, 2015 Share Posted August 3, 2015 Hi, is the handjs dependency present?I can say that I have used all three cameras on both mobile and desktops, and they all worked as expected. Quote Link to comment Share on other sites More sharing options...
Gerente Posted August 3, 2015 Author Share Posted August 3, 2015 Yes, I have included them in the "head": <script src="hand.minified-1.2.js"></script><script src="babylon.js"></script> The weird thing is that ArcRotateCamera works fine. Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 3, 2015 Share Posted August 3, 2015 Free camera will not work on mobiles, and touch won't work on desktops with no rich support. So what's left is the fact that the touch camera doesn't work on the iPhone, right? (Which is odd, but leaves us with one single problem :-) ). Anyone else can confirm that? I'm not an iPhone user.I'm also not sure what you mean by arc rotate not staying on 0,0,0. Quote Link to comment Share on other sites More sharing options...
Gerente Posted August 3, 2015 Author Share Posted August 3, 2015 Free camera will not work on mobiles, and touch won't work on desktops with no rich support. So what's left is the fact that the touch camera doesn't work on the iPhone, right? (Which is odd, but leaves us with one single problem :-) ). Anyone else can confirm that? I'm not an iPhone user.I'm also not sure what you mean by arc rotate not staying on 0,0,0. The ArcRotateCamera rotate around an object, using it as pivot, that why one of it params is the distance between the camera and the object. It kind of work if I use distance=0.01 between (0,0,0) but looks like hack. This is the only whay to make it work on PC and Mobile: var camera = new BABYLON.ArcRotateCamera("Camera", 0, Math.PI / 2, 0.1, BABYLON.Vector3.Zero(), scene);camera.attachControl(canvas, false); 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.