I think thats the FreeCamera that is being used to walk around.
By animating the ArcRotateCamera to the correct position and then changing the scene.activeCamera to the FreeCamera you can toggle between then.
so in my case I use ArcRotate camera for the first function of my first scene and after animation through a path, I should change the camera to a new camera which is freecamera in my second function of my second scene, am I right ?
var createScene1=function()
{
var scene =new BABYLON.Scene(engine);
camera1 = new BABYLON.ArcRotateCamera("Camera",0, 0, 10, new BABYLON.Vector3(0,
0, 0), scene);
camera1.attachControl(canvas, true);
BABYLON.SceneLoader.Append("/data/html/babylonTest/", "coffrageLight.babylon", scene,
function(scene){
scene.clearColor = new BABYLON.Color3(1, 1, 1);
});
return scene;
};
var createScene2 = function ()
{
var scene = new BABYLON.Scene(engine);
var MyGoal = new BABYLON.Vector3(5,1,0);
camera2 = new BABYLON.ArcRotateCamera("Camera2", 0, 0, 10, new
BABYLON.Vector3(0,0,0), scene);
camera2.attachControl(canvas, true);
BABYLON.SceneLoader.Append("/data/html/babylonTest/", "coffrageLight.babylon",
scene,function(scene){
scene.clearColor = new BABYLON.Color3(1, 1, 1);
})
var MyCurve= MyPath(camera2.position,MyGoal);
MoveCameraThrough(scene, camera2, MyCurve);
return scene;
};
Here I used two scenes with two cameras but I choose ArcRotateCamera for both, I need your orientation
thank you
So you want one camera that behaves as an arcRotateCamera to look around and a freeCamera to move around. Not sure how using touch you differentiate between a touch to look around and a touch to move. However as you must have a way to do this then you can construct your own inputs to control the way the camera reacts Customize Camera Inputs - Babylon.js Documentation
This might be a better solution than working with two cameras.
yes, but the problem is when I walk through the path I’ll add some visual alarm and messages in the interface.
because I work to develop a metro station interface, and when there is an alarm I go to the position of the alarm and I add some indication of the alarm, so I decide to make 2 different scenes.
If there is better am listening
I’ll try again, because I had a problem that I couldn’t switch between the normal vision and the goal vision inside the same scene (I’ve a boolean variabl that decide to move the camera).
I find this creating of two scenes odd too.Create two cameras in your scene but only make one active.Something like:
Cam1 → < Scene Event > → Cam2
The Scene Event could be a click, end of animation, collision with hidden object, end of audio file etc. Whatever the trigger, call a SwitchCam function that will switch the cameras and anything else you need to do.