AddictArts/three.js — comment on commit 3a4b8d442c0c547007bb6bccafe9e4a32f5cf898
File:  line 0
By alteredq:

> I agree it's better if the geometry is already modeled properly, but sometimes its not and we'd like to be able make procedural modifications without having to bother the model's author to fix it (assuming we have access to the author)

And that's exactly what `geometry.applyMatrix` was created for (and why OBJ converter / Blender exporter have alignment options) - a lot of models out there are indeed messed up.

If you have consistent single use case for a particular geometry that requires different transform you can just bake it.

If you have more use cases that would require different pivots for the same geometry, you could use scenegraph for adding per-use transforms.

> I tried calling THREE.GeometryUtils.center(logs.geometry);, but the result was the same as the second image. Am I not using it properly?

Not sure, I don't see much what's going on in `ColladaLoader` and how exactly your data looks.

`GeometryUtils.center` depends on bounding box, so for example if your model has some wild vertices somewhere far on one side, it could give unexpected results. For example I have seen some models that had in the same geometry small stuff at the other end of the scene.

You could dump bounding box to console to see what's going on:

```javascript
logs.geometry.computeBoundingBox();
console.log( logs.geometry.boundingBox );
```

The way `GeometryUtils.center` is supposed to be used is simple:

```javascript

function loaderCallback( geometry ) {

THREE.GeometryUtils.center( geometry );
var mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial() );
scene.add( mesh );

}
```

I use it for example here when rigging a car model:

https://github.com/mrdoob/three.js/blob/master/examples/js/Car.js#L279