I have my scene’s active camera animated from a GLTF. It works great.
The case is that, when the animation ends, I want to access the position and orientation of that camera, but scene.activeCamera.position and scene.activeCamera.rotation returns a Zero vector.
What am I doing bad?
Must I instead copy position and orientation from the AnimationGroups?
Of course. Please take a look at it by visiting this link.
Te point is that, after the camera animation reach its final frame, I can’t retrieve its position and/or orientation, as both have been (apparently) cleared out.
This is pretty much expected like on Transform/Mesh position and rotation are the local values and in your example, what is animating are the parent transforms, not the camera node itself
About the rotation you can access the world space one through absoluteRotation
Thanks for the info, @sebavan. That’s really very appreciated.
Anyway, maybe having globalPosition on a hand, but absoluteRotation on the other is a little not very clean. Isn’t it?
In addition, for sure all these group nodes (transformation nodes) are a great deal when you look at the whole picture of a 3D engine, and want to have all the flexibility; but in a day-by-day basis of work with 3d artists, and of course through the “special” behavior of the different exporters involved, we have there a continuous source of problems.
Very important to have always a hundred eyes on it.