Imported mesh operating troubles

Hi everyone!
Can anyone explain what im doing wrong? My imported (or appended, nwm) models cant be operated through scene.meshes[i] or any other way. What is wrong? Example: Babylon.js Playground

Hey there, welcome to the forum! :slight_smile: The model is loaded with a rotationQuaternion, which causes the rotation vector to be ignored. But once the rotationQuaternion is set to null then the rotation vector can be animated like below.

1 Like

Careful with this. Nulling out the rotationQuaternion will also remove the original rotation that was set on the loaded model. Perhaps using addRotation would be a more generic solution.

PG: https://www.babylonjs-playground.com/#PRNWPM#3

1 Like

Also another option is to call toEulerAngles on the rotationQuaternion before nulling it, if you just want to use the rotation vector. :slight_smile:

1 Like