Jump to content

Camera Question


Gerente
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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