This repository has been archived by the owner on Mar 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
Export camera with an extra parent node #265
Comments
Lee-Heisenbug
changed the title
Export camera with a parent node
Export camera with an extra parent node
Jul 13, 2018
See #113 — omitting that parent node is not straightforward. Perhaps you could use |
I've tried to control the camera's parent using THREE.OrbitControls. But there are some issues:
I've made a fiddle: https://jsfiddle.net/Lee_Heisenbug/h0mky27p/ I'll keep looking at it. |
Seems like the remaining issues are likely threejs-related, feel free to open something on the forum (http://discourse.threejs.org/) or Stack Overflow if you still need help with this. |
@donmccurdy I can find a way to work with the camera. I guess I have to live with it, since the exporter is not going to change currently. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There's a .blend file which has a scene with an animated camera.
animated_camera.zip
After I exported the whole scene and the camera( with the "Export cameras" checked ), the exported gltf file showed that the camera got an extra parent node. And the camera's rotation.x was -Math.PI/2 (the order was "XYZ"). I managed to palyed the camera animation using three.js and it was fine. After the end of animation, I tried to use THREE.Orbitcontrol. But the camera seemed uncontrollable. I thought the orbitcontrol may only control the camera's transformation. I pulled the camera out of it's parent node and made it apply it's parent's matrix and add it to the scene so that the camera's status was the same as before. And now I'm able to control the camera with orbitcontrol.
But what if I want to play the animation again? Am I supposed to put the camera in the parent node and set the camera's rotation=-Math.PI/2? That's kind of inconvenient, right?
Is there a way to export the camera without an extra parent node?
The text was updated successfully, but these errors were encountered: