There is a rotation offset bug with freecamera GLTF exports.
The exported freecamera wrongly adds a rotation offset that is equal to its parent.
Suppose freecamera.parent = tnode;
If tnode.rotation.z = 90 degrees, the exported GLTF will ALSO have freecamera.rotation.z = 90 degrees. This results in the camera having a total rotation.z of 180 degrees, which is weird
Hello,
this is perfectly legit into GLTF camera documentation, where the camera might be attached to a node to define the orientation.
But from Babylon Point of view, a camera is NOT a transform node
When exporting, scene is defined as a node list using the following statement.
Yes, the thing is it’s not just BJS, Blender also imports the GLTF with the wrong rotation offsets in the exact same way
So I think solving this issue (perhaps like you suggested KEEP_BABYLON_CAMERA_BEHAVIOUR in the export code) would be extremely useful for lots of people who use cameras in BJS