kovacsv / JSModeler

A JavaScript framework to create and visualize 3D models.
MIT License
654 stars 123 forks source link

How to set camera look at selected mesh? #35

Open OrangeOlko opened 6 years ago

OrangeOlko commented 6 years ago

Hello, thanks for your great work!

Could you please advise how to rotate model to desired mesh? I use viewer with Three.

I only saw in code few predefined cameras. Direct call to .camera.lookAt(mesh.position) does nothing.

Thanks in advance

kovacsv commented 5 years ago

Hello!

I know this is an old question, but I'm still inside one year :)

Here is an example on how to do this: https://rawgit.com/kovacsv/JSModeler/development/sandbox/camerapos.html

OrangeOlko commented 5 years ago

Hello,

This question is still actual:) Thank you!