A problem with the axes x,y,z in my gltf model

Hi,
I have a problem with the axes x,y,z in my gltf model,
see my example here:

https://playground.babylonjs.com/#8LFTCH#822

Here in playground they are different than in sandbox. E.g. mesh pic0 has coordiante:
x=3.5, y=0.95, z=3.15
But in .CreateAndStartAnimation to show this pic0 must use this coord:

  targetEndPos = new BABYLON.Vector3(-3.45, 1, 3.5);
  camEndPos = new BABYLON.Vector3(-3.45, 1, 0.5);

Strange. Un an smarthone android looks even different.

Ok, I already know the first explanation:
scene.useRightHandedSystem = true;

But why is the y axis scaled?

I don’t really understand the problem with the y coordinate…

Using:

  targetEndPos = new BABYLON.Vector3(-3.45, 0.94, 3.5);
  camEndPos = new BABYLON.Vector3(-3.45, 0.94, 0.5);

does work.

1 Like

actually yes. But a little too high.
then maybe another question. How to start the sequence of animation: i.e. go to one mesh , wait and then go to the second mesh:

      var targetEndPos_pic0 = new Vector3(3.45, 0.1, 3.15);
      var camEndPos_pic0 = new Vector3(3.45, 0.1, 0.0);
      Animation.CreateAndStartAnimation('at1', camera, 'position', speed, frameCount, camera.position, camEndPos_pic0, 0, ease);
      Animation.CreateAndStartAnimation('at2', camera, 'target', speed, frameCount, camera.target, targetEndPos_pic0, 0, ease);
      
      var targetEndPos_pic1 = new Vector3(1.2, 0.1, 3.15);
      var camEndPos_pic1 = new Vector3(1.2, 0.1, 0.0);
      setTimeout(() => {
        Animation.CreateAndStartAnimation('at1', camera, 'position', speed, frameCount, camera.position, camEndPos_pic1, 0, ease);
        Animation.CreateAndStartAnimation('at2', camera, 'target', speed, frameCount, camera.target, targetEndPos_pic1, 0, ease);
      }, 3000);
 

These two links should help :slightly_smiling_face:

5 Likes