Actually I am experimenting to get a better understanding of Babylon’s camera behavior. In my scene i have a Mesh (simple cone) that is rotatable and I added a Face as a texture to it. Now I try to let my camera’s perspective (flycam as cone ‘actioncam’) look in the way my cone “looks”
I tried the following:
var actioncam = new BABYLON.FlyCamera(“ActionCam”, new BABYLON.Vector3(myMesh.position.x, value, myMesh.position.z), scene);
var abcQuaternion = BABYLON.Quaternion.RotationAlphaBetaGamma(myMesh.rotationQuaternion.x, myMesh.rotationQuaternion.y, myMesh.rotationQuaternion.z);
actioncam.setTarget(new BABYLON.Vector3(abcQuaternion.x,abcQuaternion.y,-180+abcQuaternion.y));
However, still I get something wrong here, for I do not understand the idea of the Quaternion I do actually not see any relation of my MeshesQuaternion and it’s actual rotation :))
Mesh rotates via:
var axis = new BABYLON.Vector3(0, shiftAxisParam, 0);
var angle = 0.09;
currentMesh.rotate(axis, angle, BABYLON.Space.LOCAL);
Any advice would be appreciated