UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Can't set Camera to glTF Object position

Open fral8 opened this issue 7 years ago • 2 comments

Hello all,

Sorry fo the apparently simple issue but I've tried multiple time and I can't figure out. So, basically, I'm loading a GLTF model in runtime using HTTP approach. My model is a building model for which I would like to move inside.

So My camera should be inside the building when my model is loaded.

  • I've tried to see the position of an object inside my building, such as a door, but the camera can't move to it, because the position is ,for all objects composing glTFscene, (0,0,0)

immagine Also primitives have the same position

  • I've tried to move manually my camera in the editor, in order to see inside my building, but when a build the exe file, The camera position is not inside the object.

How I can do to solve this problem?

Thank You, Frank

fral8 avatar Mar 01 '19 23:03 fral8

Ok,

My problem was basically related to this issue To solve the positioning problem, I've used a function to calc the bound of building and with this, I put the camera in the center of the model.

fral8 avatar Mar 03 '19 14:03 fral8

It sounds like you resolved this issue - please reopen if not

ericob avatar Mar 04 '19 22:03 ericob