ZenZoy Posted January 6, 2016 Share Posted January 6, 2016 I have an ArcRotateCamera targeted on a sphere like this: camera = new BABYLON.ArcRotateCamera("camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene); earth = BABYLON.Mesh.CreateSphere("earth", 16, 2, scene); After clicking on the sphere at point P1 = (x1, y1, z1) , I'd like for the camera to animate in a way that it would change its focus directed at P1.Ideally I would like the camera to animate to a new position P2 = (x1 * 2, y1 * 2, z1 * 2) but I realized that I need to animate an arcRotateCamera using its alpha, beta and radius.So my question is how can I convert P2 position to its corresponding alpha, beta and radius to give me this animation affect. thanks in advance,Sima Quote Link to comment Share on other sites More sharing options...
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.