trois icon indicating copy to clipboard operation
trois copied to clipboard

Use GLTF camera

Open liqueflies opened this issue 4 years ago • 1 comments

Hello!

As I see inside renderer, I can't substitute the camera as it's treated as a computed. Am I wrong?

I want to use the camera from my gltf but for now no luck...

Any ideas?

Thank you so much for your work 💚

liqueflies avatar Dec 01 '21 10:12 liqueflies

Hi, there's a camera getter/setter in renderer component but I think it's better to copy gltf camera position.

When Gltf model is loaded you can copy camera position, something like this :

const camera = this.$refs.camera
camera.position.copy(model.cameras[0].position)
camera.quaternion.copy(model.cameras[0].quaternion)
camera.scale.copy(model.cameras[0].scale)

klevron avatar Dec 15 '21 17:12 klevron