I managed to load my gltf model, but no success with rotating the object around its center.
I have found two examples on how to rotate around center of a gltf, but both give the same error message: “gltf is not defined”. The two methods are currently commented out and called Test and Test2 on the index html here: http://sphericalpanoramas.com/moonlightman3D/
Am I doing something wrong with the syntax?
You are accessing gltf.scene
outside of onLoad()
. The problem is that the gltf
object is only valid in this callback. So try to move your commented out code section into onLoad()
.
That did the trick. Thanks! It is a scan of a life-sized bust the special effects makeup artist sent me.